Preheat your oven to 400°F (200°C). Lightly grease a 9x13‑inch baking dish and set it aside.
Heat the olive oil in a large skillet over medium‑high heat. Add the ground beef and cook, breaking it up with a spoon, until browned and no longer pink, about 5 to 7 minutes.
Add the chopped onion to the skillet and cook, stirring occasionally, until softened and lightly golden, about 3 to 4 minutes. Stir in the minced garlic and cook for 30 seconds, just until fragrant.
Sprinkle the chili powder, ground cumin, smoked paprika, dried oregano, salt, and black pepper over the beef mixture. Stir well so the spices coat the meat and onions, and cook for 1 minute to toast the spices slightly.
Add the black beans, corn kernels, diced tomatoes with green chilies (with their liquid), and tomato sauce to the skillet. Stir everything together until well combined and bring the mixture to a gentle simmer.
Reduce the heat to low and let the filling simmer for about 5 minutes, stirring occasionally, to allow the flavors to blend and the mixture to thicken slightly.
Taste the filling and adjust the seasoning with a little more salt or pepper if needed. Remove the skillet from the heat.
Transfer the beef and bean mixture to the prepared 9x13‑inch baking dish, spreading it out into an even layer.
Sprinkle the shredded cheddar cheese evenly over the hot filling so it begins to melt slightly.
In a medium mixing bowl, whisk together the yellow cornmeal, all‑purpose flour, granulated sugar, baking powder, and salt for the cornbread topping.
In a separate small bowl, lightly beat the egg. Add the milk and melted butter to the egg and whisk until smooth.
Pour the wet ingredients into the bowl with the dry ingredients. Stir gently with a spatula or spoon just until combined and no dry patches remain. Do not overmix; a few small lumps are fine.
Spoon the cornbread batter over the cheesy beef and bean filling in the baking dish. Use the back of the spoon to spread the batter into an even layer that covers the surface from edge to edge.
Place the baking dish in the preheated oven and bake for 20 to 25 minutes, or until the cornbread topping is golden brown and a toothpick inserted into the center of the cornbread comes out clean.
Remove the Texas Tamale Pie Casserole from the oven and let it rest for about 10 minutes so the filling can settle and the slices hold together better.
Sprinkle the chopped fresh cilantro over the top, if using, then slice the casserole into portions and serve warm.