Bring a large pot of salted water to a boil.
Add the pasta and cook according to package directions until 2 minutes before al dente.
Add the broccoli florets to the boiling pasta water and continue cooking for the remaining 2 minutes until the pasta is al dente and broccoli is tender-crisp.
Before draining, reserve at least 1 cup of the starchy pasta cooking water.
Drain the pasta and broccoli and return them to the pot over low heat.
In a small bowl, whisk together the ricotta, lemon zest, lemon juice, minced garlic, and olive oil.
Fold the ricotta mixture into the pasta and broccoli.
Gradually stir in the reserved pasta water, 1/4 cup at a time, until a creamy sauce forms and coats the pasta.
Stir in the grated Parmesan cheese, salt, black pepper, and red pepper flakes.
Adjust seasoning to taste and serve immediately.