Bring a large pot of salted water to a boil and cook the elbow pasta until al dente according to package instructions. Drain and set aside.
While the pasta cooks, peel and dice the yellow onion and mince the garlic.
Heat a large skillet over medium-high heat. For an oil-free method, add 2–3 tablespoons water or vegetable broth. Sauté the diced onion, adding more liquid as needed, until soft, about 8 minutes.
Add the minced garlic, chili powder, ground cumin, dried oregano, and smoked paprika to the skillet and cook, stirring, for about 1 minute until fragrant.
Reduce heat to medium and pour in the tomato sauce. Add the rinsed and drained kidney beans and the cooked corn. Stir to combine and simmer gently for 8–10 minutes, stirring occasionally.
Stir the cooked pasta into the sauce and heat for 2–3 minutes until everything is warmed through. If using, stir in fresh baby spinach at the end until wilted.
Taste and season with salt and pepper as needed, then serve with desired toppings.