Preheat your oven to 375°F (190°C). Lightly grease a 9x13-inch baking dish.
Warm the olive oil in a large skillet over medium heat.
Add the onion and cook until translucent, about 3–4 minutes. Stir in the garlic and cook 30 seconds, until fragrant.
Add the bell pepper, zucchini, and mushrooms. Cook, stirring occasionally, until the vegetables soften and release their moisture, 6–8 minutes.
Stir in the corn, black beans, and drained tomatoes.
Season with oregano, smoked paprika, cumin, chili flakes (if using), salt, and pepper. Cook 2–3 minutes to blend the flavors.
Fold in the cooked quinoa or brown rice and the tomato sauce. Taste and adjust seasoning.
The mixture should be well-seasoned and slightly saucy.
Transfer the mixture to the prepared baking dish. Sprinkle evenly with shredded cheese and Parmesan, if using.
Bake for 18–22 minutes, until the cheese is melted and bubbling and the casserole is heated through.
Let it rest for 5 minutes. Garnish with chopped parsley or cilantro.
Serve warm.