Preheat your oven to 375°F (190°C). Grease a 9×13-inch baking dish with cooking spray or butter.
Heat olive oil in a large skillet over medium heat. Add the diced onion and cook until translucent, about 3-4 minutes.
Add the bell pepper and jalapeño (if using) and continue cooking for another 3 minutes until vegetables begin to soften. Add minced garlic and cook for 30 seconds until fragrant.
Stir in the black beans and corn. Cook for 2 minutes just to combine flavors and warm through. Season with a pinch of salt and pepper. Remove from heat and set aside.
In a large bowl, whisk together eggs, milk, salt, pepper, and cumin until well combined.
Spread half of the tortilla chips in an even layer at the bottom of the prepared baking dish. Pour half of the enchilada sauce over the chips, ensuring they're evenly coated but not completely soaked.
Sprinkle half of the vegetable-bean mixture over the sauce-coated chips, followed by half of the cheese blend.
Add another layer with the remaining chips, enchilada sauce, and vegetable-bean mixture. Carefully pour the egg mixture evenly over the entire casserole, allowing it to seep into the layers. Finish with the remaining cheese on top.
Cover the baking dish with aluminum foil and bake for 25 minutes. Then remove the foil and bake for an additional 10 minutes until the eggs are set and the cheese is bubbly and slightly golden.
Allow the casserole to rest for 5 minutes before serving. Top with sliced avocado, chopped cilantro, diced red onion, and serve with lime wedges and sour cream on the side.