Boil the pasta: Bring a large pot of salted water to a boil.
Cook pasta until just al dente. Reserve about 1 cup of pasta water, then drain.
Sauté the zucchini: While pasta cooks, heat olive oil in a large skillet over medium-high. Add zucchini and a pinch of salt.
Cook 5–7 minutes, stirring occasionally, until golden in spots and tender-crisp.
Add aromatics: Lower heat to medium. Stir in garlic and red pepper flakes. Cook 30–60 seconds until fragrant—don’t let the garlic brown.
Combine with pasta: Add drained pasta to the skillet with the zucchini.
Toss to coat, then add the pesto and a splash (2–4 tablespoons) of reserved pasta water. Toss until glossy.
Finish with brightness: Stir in lemon zest and juice, plus the grated cheese. Add more pasta water, a tablespoon at a time, until the sauce clings to the pasta silkily.
Season and serve: Taste and adjust with salt and pepper.
Top with extra cheese, torn basil, and toasted nuts if you like. Serve warm.