Preheat the oven to 375°F (190°C).
Bring a large pot of salted water to a boil and cook the whole wheat macaroni according to package instructions until al dente; drain well in a colander.
In a large mixing bowl, combine the cooked macaroni, drained beans, salsa, cumin, chili powder, black pepper, salt, and 3/4 cup of the grated cheddar; mix until evenly combined.
Transfer the mixture to a medium casserole dish and spread it into an even layer.
Top with the remaining 1/4 cup grated cheddar (or more to taste), cover loosely with foil, and bake for 25–30 minutes until hot and bubbly.
Remove from the oven and let rest a few minutes before serving.