Heat olive oil in a large skillet over medium-high heat.
Season chicken with salt, pepper, and garlic powder.
Add chicken to the skillet and cook 6–8 minutes, stirring occasionally, until browned and cooked through.
Reduce heat to medium and pour in heavy cream, pesto, and Parmesan.
Stir until the sauce is smooth and begins to thicken.
Add red pepper flakes and optional spinach.
Simmer 3–5 minutes until the sauce is creamy and the spinach is wilted.
Serve hot.