01 - Preheat oven to 375°F. Lightly grease a 9x13-inch baking dish.
02 - Heat olive oil in a large skillet over medium heat. Add chopped red onion and sauté for 2 to 3 minutes until softened.
03 - Stir in shredded chicken, black beans, thawed corn, cumin, chili powder, garlic powder, salt, and black pepper. Cook for 2 to 3 minutes until heated through. Remove from heat.
04 - Spread ½ cup of enchilada sauce evenly on the bottom of the prepared baking dish.
05 - Place 4 corn tortillas over the sauce, tearing to fit the dish if necessary.
06 - Spread half of the chicken mixture over the tortillas, drizzle with ½ cup enchilada sauce, and sprinkle with 1 cup of shredded cheese.
07 - Layer remaining 4 tortillas, then the remaining chicken mixture, followed by ½ cup sauce and 1 cup cheese.
08 - Pour the final ½ cup of enchilada sauce evenly over the top. Cover loosely with aluminum foil.
09 - Bake covered for 20 minutes. Remove foil and bake an additional 10 to 15 minutes until cheese is melted, bubbly, and golden brown.
10 - Allow casserole to cool for 10 minutes before slicing. Garnish with cilantro, sour cream, avocado slices, and lime wedges if desired.