Cook the spaghetti according to package instructions in a large pot of salted boiling water until al dente. Drain and set aside, reserving 1/2 cup of pasta water.
In a large skillet, heat the olive oil over medium heat. Add the diced onion and sauté for 3-4 minutes until translucent.
Stir in the minced garlic and cook for an additional 1 minute until fragrant.
Add the diced bell pepper and zucchini to the skillet, cooking for about 5 minutes until they begin to soften.
Mix in the cherry tomatoes, oregano, basil, red pepper flakes (if using), salt, and pepper. Cook for another 3-4 minutes until the tomatoes start to break down.
Add the cooked spaghetti to the skillet, tossing to combine. If the mixture seems dry, add a little reserved pasta water until the desired consistency is reached.
Remove from heat and stir in the grated Parmesan cheese until melted and well combined.
Serve immediately, garnished with fresh basil leaves and additional Parmesan if desired.