Heat a saucpan over medium-low heat. Add oil to heat pan and swirl to coat the bottom.
Add onion and cook for 2-3 minutes until it starts to soften. Add garlic and cook 1-2 minutes longer. Do not let the onion or garlic brown. If they start to brown, turn down the heat.
Add chili powder, coriander, cinnamon and salt. Stir to coat onions and cook for 1 minute, stirring frequently to keep spices from sticking or burning.
Add stock. Stir in pumpkin until smooth.
Add beans, corn, oregano, lemon or lime juice, and pepper.
Bring to a simmer and cook for 20 minutes. Stir occasionally to keep the soup from sticking.
You can serve the soup immediately. It will taste even better if made ahead and reheated.