Preheat your oven to 375°F (190°C).
Cook the ziti pasta according to package instructions until al dente; drain and set aside.
In a large skillet, heat olive oil over medium heat. Add diced onions and cook until softened, about 5-7 minutes.
Stir in minced garlic and cook for an additional 1-2 minutes until fragrant.
Add the diced bell pepper, zucchini, and sliced mushrooms to the skillet; cook for 5-7 minutes until tender.
Stir in the spinach, marinara sauce, oregano, basil, and red pepper flakes; simmer for 5 minutes.
In a large bowl, combine the drained pasta, ricotta cheese, and vegetable sauce. Mix until well combined.
Transfer the pasta mixture to a greased 9x13 inch baking dish; spread evenly.
Top with shredded mozzarella and grated Parmesan cheeses.
Bake in the preheated oven for 25-30 minutes until the cheese is bubbly and golden.
Let the baked ziti rest for 10 minutes before serving.