In a large pot, over medium heat, heat oil.
Add onions and cook until soft; about 5 minutes.
Add garlic and cook until fragrant; about 1 minute more.
Add pasta and broccoli, stir in water and half-and-half.
Season with salt, pepper and red pepper flakes.
Bring to a boil; reduce heat and let simmer, stirring occasionally, until pasta is al dente; 12 to 14 minutes.
Add cheeses and stir until melted.