Preheat your oven to 180°C (350°F). Lightly grease your baking dish with a bit of oil or non-stick spray.
Dice the onion and mince the garlic. In a large skillet, heat olive oil over medium heat. Sauté the onion until translucent and fragrant, about 3-4 minutes.
Add the chopped leftover vegetables to the skillet and cook until they are tender and slightly caramelized, about 5-7 minutes. The mixture should smell sweet and be lightly browned around the edges.
While the vegetables cook, warm the enchil sauce in a small saucepan over low heat until steaming. If it’s thick, stir in a splash of water to loosen it up.
Warm the tortillas briefly in the microwave for about 20 seconds to make them more pliable for layering.
Spread a thin layer of enchilada sauce at the bottom of your prepared baking dish. Place a tortilla over the sauce, then spoon some sautéed vegetables over it. Sprinkle a little cheese and mashed black beans over the vegetables.
Repeat the layering process — tortillas, vegetables, beans, cheese, and sauce — until all ingredients are used, finishing with a top layer of sauce and cheese.
Cover the assembled casserole with foil and bake for 20 minutes. Then, remove the foil and bake uncovered for an additional 10 minutes, until the cheese is bubbly and golden around the edges.
Check that the cheese is melted and bubbling, and the edges are crispy. Let the casserole rest outside the oven for at least 10 minutes to set the layers.
Slice into squares and serve hot, garnished with herbs or a squeeze of lime if desired. Enjoy this cozy, veggie-loaded enchilada casserole!