01 - Preheat oven to 400°F (200°C). Toss pumpkin cubes with 1 tablespoon olive oil, salt, and pepper. Spread evenly on a baking sheet. Slice the top off the head of garlic, drizzle with the remaining 1 tablespoon olive oil, wrap securely in aluminum foil, and place on the same baking sheet as the pumpkin.
02 - Roast for 25–30 minutes, or until the pumpkin is tender when pierced with a fork and the garlic cloves are soft. Allow to cool slightly before proceeding.
03 - While vegetables are roasting, cook the macaroni in a large pot of salted boiling water according to package directions until al dente. Drain thoroughly and set aside.
04 - Once cooled slightly, squeeze the soft roasted garlic cloves from their skins. In a blender or food processor, combine the roasted pumpkin and squeezed garlic. Blend until a smooth purée is achieved.
05 - In a large saucepan, melt the unsalted butter over medium heat. Whisk in the all-purpose flour and cook for 1 minute, stirring constantly, to form a roux. Gradually whisk in the whole milk, continuing to cook and whisk until the sauce thickens, approximately 3–4 minutes.
06 - Stir the pumpkin-garlic purée into the thickened milk sauce. Add the shredded cheddar and Gruyère cheeses, ground nutmeg, and smoked paprika. Stir until the cheeses are fully melted and the sauce is smooth. Season with salt and freshly ground black pepper to taste.
07 - Add the drained cooked macaroni to the cheese sauce and stir gently to ensure all pasta is evenly coated.
08 - If using the topping, combine the panko breadcrumbs, grated Parmesan cheese, and melted butter in a small bowl. Mix until well combined.
09 - Transfer the mac & cheese to a baking dish if desired. Sprinkle the prepared topping evenly over the surface. Place under a preheated broiler for 2–3 minutes, watching carefully, until the topping is golden brown and toasted.
10 - Serve the roasted garlic pumpkin mac & cheese hot. Garnish with additional shredded cheese or fresh herbs, if desired.