Preheat oven to 375° Fahrenheit.
Make the enchilada sauce by heating olive oil in a large skillet over medium heat. Sprinkle in flour and whisk together, cook for 2 minutes.
Whisk in chili powder, garlic powder, cumin, dried oregano, salt, and tomato paste. Cook for 3-5 minutes or until very fragrant.
Pour in vegetable broth and apple cider vinegar, bring to a boil then reduce to a simmer for 5-7 minutes or until sauce has thickened. Remove from heat and set aside.
Make the enchilada filling by heating olive oil in a large skillet over medium heat, then sauté red onion, bell pepper, and garlic in oil for about 4-5 minutes or until soft.
Add in spinach and corn, cook until spinach has completely cooked down and wilted. Mix in the refried beans until warm throughout.
Spread 1 cup enchilada sauce on the bottom of a casserole dish. Wrap tortillas in a damp paper towel and microwave until very pliable. One at a time, spoon 1/4 cup filling to the middle of the tortilla and roll. Place, seam-side down, in the casserole dish on top of the enchilada sauce. Repeat until you’ve run out of filling.
Cover enchiladas with remaining sauce, then bake for 15 minutes. Remove from oven, let cool for about 5 minutes, then serve with avocado.