Pat chicken breasts dry with paper towels. Season both sides with salt, pepper, garlic powder, and Italian seasoning.
Heat olive oil in a large skillet over medium-high until shimmering. Add chicken and cook 6 to 7 minutes per side until deep golden brown. Internal temperature must read 75C (165F). Transfer to a plate and tent loosely with foil.
Reduce heat to medium. Add diced onion to the same pan and cook 3 to 4 minutes until softened. Add minced garlic and cook 1 minute until fragrant.
Add sun-dried tomatoes and red pepper flakes if using. Stir and cook 1 minute.
Pour in chicken broth. Scrape up all browned bits from the pan bottom with a wooden spoon. Simmer 2 to 3 minutes until reduced by a third.
Reduce heat to low. Add heavy cream and stir to combine. Simmer gently 3 to 4 minutes until the sauce coats the back of a spoon.
Add grated parmesan a handful at a time, stirring after each addition until fully melted and smooth.
Add spinach in two or three batches, stirring after each until wilted, about 2 minutes total.
Nestle chicken back into the sauce. Spoon sauce over the top. Cook on low 3 to 4 minutes until heated through.
Remove from heat. Garnish with fresh basil and serve immediately.