Heat the vegetable oil in a large pot over medium heat.
Add the onion and cook for about 6 minutes until soft, stirring as it cooks.
Add the bell pepper and tomato paste and cook for another 2 minutes.
Add the chopped tomatoes, garlic, cumin, chili powder, oregano, smoked paprika, cinnamon, and 1 teaspoon of salt.
Then, mix in the black beans, red kidney beans, and lentils until well combined. Leave to simmer uncovered on low heat while you make the cornbread topping.
Preheat the oven to 400 F.
Mix the cornmeal, flour, 2 ounces of cheese, sugar, baking powder, and ½ teaspoon of salt in a large mixing bowl.
In a separate bowl, mix the milk, yogurt, eggs, and butter.
Stir the wet ingredients into the dry ingredients until well combined.
Fold in the sweetcorn and jalapeños and set aside.
Transfer the bean mixture to a 9x11-inch oven-proof dish.
Scatter the remaining 3 ounces of cheese on top of the filling.
Spread the cornbread topping mixture evenly on top and bake for 25 to 30 minutes until the cornbread topping is nice and golden.
Serve this tamale pie topped with yogurt, cilantro, and lime wedges if desired.