Preheat the oven. Set your oven to 375°F (190°C).
Lightly grease a 9x13-inch baking dish.
Sauté the aromatics. Warm olive oil in a skillet over medium heat. Add the chopped onion with a pinch of salt and cook 3–4 minutes, until softened and lightly golden. Stir in cumin and chili powder; cook 30 seconds until fragrant.
Mix the filling. In a large bowl, combine shredded chicken, sautéed onions, black beans, corn, 1/2 cup enchilada sauce, 1/2 cup cheese, and half the cilantro.
Taste and season with salt and pepper.
Prep the tortillas. If your corn tortillas are stiff, warm them briefly in a dry skillet or microwave wrapped in a damp paper towel for 20–30 seconds. This helps them stay tender and prevents cracking.
Start layering. Spread 1/3 cup enchilada sauce over the bottom of the baking dish. Arrange a layer of tortillas to cover the base (overlap as needed).
Spoon half the chicken mixture over the tortillas and spread evenly. Sprinkle with 3/4 cup cheese.
Repeat. Add another layer of tortillas, then the remaining chicken mixture, and another 3/4 cup cheese.
Top it off. Finish with a final layer of tortillas, the remaining enchilada sauce spread evenly over the top, and the remaining cheese.
Bake. Cover the dish with foil and bake for 15 minutes. Remove the foil and bake another 10–15 minutes, until the cheese is melted, bubbly, and lightly browned at the edges.
Rest and garnish. Let the casserole rest for 10 minutes to set.
Sprinkle with the remaining cilantro and add your favorite toppings.
Serve. Cut into squares and serve warm with lime wedges on the side.