Bring a large pot of well-salted water to a boil. Cook the penne until al dente (about 8–10 minutes). Reserve 1 cup of pasta water, then drain.
While the pasta cooks, season the chicken with salt and pepper. Heat the olive oil in a large skillet over medium-high heat. Cook the chicken until golden and cooked through, about 6–7 minutes per side (depending on thickness).
Transfer chicken to a plate and rest for 5 minutes, then slice into strips or bite-size pieces.
In the same skillet over medium heat, melt the butter. Add the minced garlic and cook for about 1 minute, just until fragrant (don’t brown it).
Pour in the heavy cream and bring to a gentle simmer. Reduce heat to maintain a low simmer and cook 2–3 minutes to slightly thicken.
Stir in the Parmesan (and mozzarella, if using) until melted and smooth. Season with salt, pepper, and a pinch of nutmeg if desired.
If adding broccoli, stir it in now (steamed or quickly blanched works best). If using spinach, add it and toss just until wilted.
Add the drained penne to the skillet and toss to coat. If the sauce is too thick, add reserved pasta water 1 tablespoon at a time until silky and saucy.
Add the chicken back to the skillet and toss to combine. Finish with parsley and basil, then serve immediately with extra Parmesan if you like.