Cut the chicken breasts into bite-sized 1-inch pieces. In a deep skillet over medium heat, melt the butter, then add the chicken and cook until lightly browned on the outside, stirring occasionally to ensure even cooking.
While the chicken is browning, mince the garlic. Add the garlic to the skillet with the chicken and sauté for another minute until fragrant.
To the skillet, add the uncooked penne pasta and chicken broth. Stir well to deglaze the pan and loosen any browned bits from the bottom. Cover the skillet with a lid, increase the heat to medium-high, and bring the broth to a boil.
Once it reaches a rolling boil, stir the pasta briefly to prevent sticking, cover again, and reduce the heat to medium-low. Allow the pasta to simmer gently for about 8 minutes, or until it becomes tender and most of the broth has been absorbed. Stir the mixture every couple of minutes to keep the pasta from sticking, replacing the lid each time to retain heat.
When the pasta is cooked and nearly all the broth is absorbed, add the milk, chunks of cream cheese, and pesto to the skillet. Stir continuously over medium heat until the cream cheese melts and blends into the sauce, creating a smooth and creamy consistency. Stir in the grated Parmesan cheese until fully incorporated.
If using, add the fresh spinach and sliced sun-dried tomatoes. Stir until the spinach has wilted and is well mixed in. Remove the skillet from the heat, then season with freshly cracked black pepper and a pinch of crushed red pepper flakes. Serve hot and enjoy.