Preheat oven to 375.
Lightly grease a 9x13 casserole dish with cooking spray and set aside.
Prepare shells according to the directions on the box.
In the meantime, heat olive oil in a large nonstick skillet.
Add garlic and butternut squash cubes; season with salt and pepper and cook for 10 to 12 minutes, or until tender, stirring frequently.
Transfer prepared squash to a bowl and set aside.
Melt butter in skillet over medium heat.
Whisk in flour; whisk until thoroughly combined.
Slowly whisk in the milk, followed by the chicken broth.
Stir in rosemary and season with salt and pepper.
Cook and stir frequently until thickened and bubbly, about 8 to 10 minutes.
Remove from heat and whisk in 1/2-cup grated parmesan cheese.
Take a little bit of the prepared sauce and smother it on the bottom of the previously prepared baking dish.
Add the prepared butternut squash to the sauce and mix to combine.
Arrange the pasta shells on the bottom of the casserole dish in a single layer.
Pour the butternut squash mixture over the pasta shells.
Add the tomato pesto and spread it over the top with an offset spatula.
Sprinkle with remaining parmesan cheese and mozzarella cheese.
Cover with aluminum foil and bake for 30 minutes, or until hot and bubbly.
Remove foil and continue to cook for 3 to 5 minutes, or until a little browned on top.
Remove from oven and let stand few minutes.