Preheat the oven to 350°F. Lightly oil a 9 x 13 inch baking dish.
Heat the oil in a very large skillet or saute pan over medium heat. Add the onion, peppers, and corn. Cook for 5 minutes, stirring occasionally, or until the onions are soft and clear. Add the garlic and cook for another minute. Add the cumin, chili powder, thyme, red pepper flakes, salt, tomatoes, and beans. Reduce the heat to a simmer and heat all of the ingredients through. Taste the mixture and adjust salt as needed. Remove the mixture from heat.
If you like, gently toast the tortillas over an open burner for a minute or so on each side. (It's fine to skip this step, but I like the slightly toasted flavor.)
Layer 6 tortillas on the bottom of your baking pan. Spread half of the vegetable and bean mixture over the tortillas and cover with a scant cup of sauce. Repeat with another layer of tortillas, vegetables/beans, and sauce. Cover this with a final layer of 6 tortillas, then spread a cup of the enchilada sauce over the tortillas.
Transfer to the oven and bake for 40-45 minutes, or until the casserole is bubbly, the sauce on top is very dark, and the top layer of tortillas is toasted. Before serving, top the casserole with a generous layer of avocado slices and plenty of chopped cilantro. Slice and serve.
Gena Hamshaw is a certified nutritionist, recipe developer, and food blogger. She shares her latest culinary adventures at The Full Helping. She's the author of two cookbooks, Food52 Vegan (2015) and Choosing Raw (2014). She enjoys yoga, sweet potatoes, cashews, and things that are smothered in sauce.