Preheat the oven to 375°F (190°C).
Cook the whole wheat macaroni in a large pot of boiling salted water according to package directions until al dente, then drain well in a colander.
In a large mixing bowl, combine the drained macaroni, drained beans, salsa, cumin, chili powder, black pepper, and salt; mix until evenly combined.
Stir in 3/4 cup of the grated cheddar until incorporated, reserving the remaining 1/4 cup for topping.
Transfer the mixture to a medium casserole dish and spread evenly. Cover loosely with foil.
Bake for 25–30 minutes, until the casserole is hot and bubbly.
Remove the foil, sprinkle the reserved cheese on top, and return to the oven briefly until the cheese melts, if desired.