01 - Preheat oven to 400°F. Lightly grease a 9x13-inch baking dish with cooking spray or a small amount of oil.
02 - Pat chicken breasts dry with paper towels. Drizzle both sides with olive oil and season evenly with salt and black pepper. Arrange chicken in the prepared baking dish in a single layer.
03 - In a medium bowl, combine spinach, artichoke hearts, cream cheese, sour cream, Parmesan cheese, minced garlic, and red pepper flakes. Mix thoroughly until all ingredients are well incorporated and smooth.
04 - Spread the spinach-artichoke mixture evenly over the top of each chicken breast, using the back of a spoon to create an even layer.
05 - Spoon basil pesto over the creamy topping on each chicken breast, spreading gently to create a thin, even layer.
06 - Sprinkle shredded mozzarella cheese evenly over the pesto layer on all chicken breasts.
07 - Bake uncovered for 30 to 35 minutes, or until chicken is cooked through and reaches an internal temperature of 165°F, and the cheese is melted and golden brown.
08 - Remove from oven and let the chicken rest for 5 minutes before serving. Garnish with fresh basil leaves if desired.