Preheat the conventional oven to 375°F (190°C) and lightly grease a round baking dish about 10 inches (25 cm) in diameter.
Add the whole-wheat penne directly to the baking dish.
Pour in the chicken broth, about 2 cups plus 2 tablespoons (500 ml) of the half-and-half, the well-drained sun-dried tomatoes, salt, black pepper, garlic powder, onion powder, and red pepper flakes, if using. Reserve the remaining half-and-half, about 6 tablespoons plus 2 teaspoons (100 ml).
Stir thoroughly, making sure the pasta is evenly distributed and as submerged in the liquid as possible.
Cover the baking dish tightly with aluminum foil, sealing the edges well to limit evaporation.
Bake in the preheated conventional oven at 375°F (190°C) for about 30–35 minutes.
After 30 minutes, check the pasta. It should be almost al dente, and there should still be some creamy sauce in the baking dish. If the pasta is still too firm, cover the dish again and continue baking for another 5 minutes.
Remove the baking dish from the oven and take off the foil.
Add the cooked chicken, cannellini beans, and spinach. If using fresh spinach, add it directly. If using cooked spinach, make sure it is well squeezed to avoid adding excess water.
Add 3.5 oz (100 g) of the mozzarella and 1.1 oz (30 g) of the Parmesan and stir gently until all the ingredients are evenly distributed. The heat from the pasta will wilt the fresh spinach and begin to melt the cheeses.
Check the consistency of the sauce. If the mixture seems too thick, gradually add some or all of the reserved half-and-half, about 6 tablespoons plus 2 teaspoons (100 ml), until the sauce is creamy but not runny.
Level the surface and top with the remaining 1.8 oz (50 g) of mozzarella and 0.35 oz (10 g) of Parmesan.
Return the baking dish to the oven, uncovered, and bake for another 5-8 minutes, until the cheese is fully melted and the dish is heated through. If you can, use a food thermometer to check that the center reaches 165°F (74°C).
Avoid extending this second baking time too much, as the whole-wheat pasta and cannellini beans will continue to absorb some of the sauce.
Remove from the oven and let rest for about 5 minutes before serving.