01 - Preheat oven to 400°F. Lightly grease a large baking dish with cooking spray or butter.
02 - Bring a large pot of salted water to a rolling boil. Add penne or rigatoni and cook until just al dente according to package directions. Drain well and set aside.
03 - Heat olive oil in a large skillet over medium heat. Add chicken pieces, season with salt and pepper, and sauté for 5 to 6 minutes until golden brown and cooked through to an internal temperature of 165°F. Remove from heat and set aside.
04 - In a large mixing bowl, combine the drained pasta, cooked chicken, basil pesto, heavy cream, minced garlic, and chopped sun-dried tomatoes. Toss until all ingredients are evenly coated with the pesto cream sauce.
05 - Transfer the pasta and chicken mixture to the prepared baking dish, spreading it into an even layer. Sprinkle shredded mozzarella evenly over the top, followed by the grated Parmesan cheese.
06 - Bake in the preheated oven for 20 minutes, or until the cheese is melted, bubbly, and golden brown on top.
07 - Remove from the oven and let rest for 5 minutes to allow the sauce to set. Garnish with fresh basil leaves if desired, then serve warm.