Bring a large pot of salted water to a boil. Cook pasta according to package directions until al dente. Reserve ¼ cup pasta water, then drain.
Heat olive oil in a large skillet over medium heat. Add chicken, season lightly with salt and pepper, and cook for 4–5 minutes until golden and cooked through. Remove chicken from skillet and set aside.
In the same skillet, melt butter over medium-low heat. Add garlic and cook for 30 seconds, just until fragrant.
Reduce heat to low and stir in heavy cream. Warm gently, then add pesto and Parmesan cheese, stirring until smooth and creamy.
Return the cooked chicken to the skillet, followed by the cooked pasta. Toss to coat evenly. Add reserved pasta water as needed to loosen the sauce.
Stir in red pepper flakes if using. Taste and adjust seasoning.
Remove from heat and garnish with fresh herbs before serving.