Place a rack in the middle of the oven and reheat it to 210 °C / 410 °F. Line a large baking sheet with parchment paper.
bake butternut squash
Peel the butternut squash, cut it in half, and remove the seeds. Cut the butternut squash into two centimeters (1-inch) cubes. Arrange the butternut squash over the baking sheet in a single layer. Add the peeled and halved shallot and peeled garlic. Drizzle the vegetables with olive oil, and season with salt and pepper. Bake the butternut squash in the oven for 40 minutes at 210 °C / 410 °F or until it's soft and caramelized.
cook the gnocchi
Place a pot with water over high heat. Season the water with salt and bring to a boil. Cook the gnocchi according to the package instructions. Drain the cooked gnocchi and preserve 200ml (2/3 cup) of cooking water.
Mix roasted butternut squash, butter, milk, rosemary, and parmesan cheese using an immersion blender or blender. The sauce will be smooth and creamy. Add the sauce to a large pan and place over low heat. Add half of the pasta cooking water (add more if necessary) and drained gnocchi. Toss to combine and serve.