Cook the ziti pasta according to package instructions until al dente. Drain and set aside.
In a large skillet, heat the olive oil over medium heat. Add the chopped onion and garlic, and sauté until the onion is translucent, about 4 minutes.
Add the diced bell pepper, zucchini, and mushrooms to the skillet. Cook for another 5-7 minutes, until the vegetables are tender.
Stir in the chopped spinach, marinara sauce, dried oregano, dried basil, and red pepper flakes (if using). Season with salt and pepper. Allow the mixture to simmer for about 5 minutes.
In a large mixing bowl, combine the cooked ziti pasta, vegetable sauce mixture, and ricotta cheese. Mix well until the pasta is evenly coated.
Transfer half of the pasta mix into a greased 9x13 inch baking dish. Sprinkle with half of the mozzarella cheese and half of the grated Parmesan cheese.
Layer the remaining pasta mixture on top, and finish with the remaining mozzarella and Parmesan cheeses.
Cover the baking dish with aluminum foil and bake for 25 minutes.
Remove the foil and bake for an additional 15-20 minutes, or until the cheese is bubbly and golden brown.
Allow the baked ziti to cool for a few minutes before serving.
Notes
Serve hot, garnished with fresh basil leaves and a sprinkle of extra Parmesan cheese for an elegant touch.