Prepare the pasta water. Bring a large pot of generously salted water to a rolling boil. The water should taste like the sea—this is crucial for flavorful pasta.
Cook the pasta according to package directions until al dente. Before draining, reserve 1 cup of the starchy pasta water, then drain the pasta.
Prepare the zucchini. While the pasta cooks, grate the zucchini using the large holes of a box grater, or cut into small dice. If grated, gently squeeze out excess moisture using a clean kitchen towel.
Sauté the aromatics. Heat olive oil in a large skillet over medium heat. Add the shallot and cook for 2-3 minutes until softened but not browned. Add the garlic and cook for another 30 seconds until fragrant.
Cook the zucchini by adding it to the skillet. Increase heat to medium-high and cook for 5-7 minutes, stirring occasionally, until the zucchini has softened and most of its moisture has evaporated.
Add the lemon. Stir in the lemon zest and half of the lemon juice, allowing it to sizzle for about 30 seconds to release its oils.
Create the creamy sauce by reducing heat to medium-low and pouring in the heavy cream. Simmer gently for 2 minutes until it starts to thicken slightly.
Add the pasta directly to the sauce. Toss to coat evenly, adding a splash of reserved pasta water if needed to loosen the sauce.
Incorporate the cheese by removing the pan from heat and gradually sprinkling in the Parmesan while tossing continuously. This prevents the cheese from clumping and creates a smooth sauce.
Finish and serve. Add the fresh basil, remaining lemon juice to taste, red pepper flakes if using, and season with salt and pepper. Serve immediately with extra Parmesan for sprinkling.