01 - Preheat the oven to 400°F. Lightly grease a 9x13-inch baking dish with olive oil or nonstick spray.
02 - Bring a large pot of salted water to a rolling boil. Add the penne or rigatoni and cook according to package directions until al dente. Drain thoroughly and set aside.
03 - While the pasta cooks, heat olive oil in a large skillet over medium-high heat. Add the diced chicken, season generously with salt and pepper, and cook for 6 to 7 minutes until golden brown and cooked through. Remove from heat and set aside.
04 - In a large mixing bowl, combine the drained pasta, seared chicken, basil pesto, heavy cream, milk, and half of the shredded mozzarella. Fold in the cherry tomatoes and baby spinach if using. Toss until everything is evenly coated.
05 - Spread the pasta mixture evenly into the prepared baking dish. Scatter the remaining mozzarella and all of the grated Parmesan over the top.
06 - Bake uncovered in the preheated oven for 20 minutes, or until the cheese is melted, bubbly, and lightly golden on top.
07 - Remove from the oven and let stand for 5 minutes to allow the sauce to settle. Garnish with fresh basil leaves if desired and serve warm.