Boil the pasta. Bring a large pot of salted water to a rolling boil.
Add the pasta and cook until just shy of al dente, 1–2 minutes less than the package suggests. Before draining, reserve 1 cup of the starchy cooking water.
Prep the vegetables. While the water heats, wash and cut your vegetables into bite-size pieces. Aim for even sizes so they cook at a similar pace.
Keep leafy greens and quick-cooking veggies (spinach, peas) separate from firmer ones (broccoli, zucchini, mushrooms).
Sauté the aromatics. In a large skillet, warm 2 tablespoons olive oil over medium heat. Add the onion or shallot with a pinch of salt and cook until softened, about 3 minutes. Stir in the garlic and red pepper flakes; cook until fragrant, about 30 seconds.
Cook the vegetables in stages. Add firmer vegetables first (broccoli, zucchini, mushrooms, peppers).
Season with salt and cook, stirring, until crisp-tender, 4–6 minutes. Add quick-cooking vegetables (tomatoes, peas, spinach) and cook 1–2 minutes more. You want bright color and a little bite.
Deglaze the pan. Add a splash of pasta water or white wine to lift any browned bits.
Let it simmer for 30–60 seconds to concentrate flavor.
Toss with pasta. Add the drained pasta to the skillet with the vegetables. Pour in 1/3 to 1/2 cup of the reserved pasta water and the remaining 1 tablespoon olive oil. Toss over medium heat for 1–2 minutes until glossy and lightly sauced.
Finish with lemon and cheese. Stir in lemon zest, a squeeze of lemon juice, and the Parmesan.
If you like, add 1 tablespoon butter for extra richness. Adjust with more pasta water if it seems dry. Season with salt and black pepper to taste.
Add herbs and serve. Fold in chopped basil or parsley.
Taste again and adjust with more lemon, cheese, or pepper. Serve hot, with extra Parmesan at the table.