Preheat oven to 400F. Slice pumpkin in half, scoop out seeds and place both halves cut-side down in a baking dish. Pour enough water in the pan to form a 1/4" layer. Place pumpkin in the oven and roast until tender, 45-55 minutes. Let cool slightly and scoop out flesh. Measure 1 cup and set aside.
Bring a pot of water to a boil, add pasta and cook until just tender, 6-7 minutes. Strain and set aside.
In a saucepan, heat butter until melted. Mince garlic and add to the pot. Cook for 1 minute. Whisk in flour, thyme, salt and pepper. Cook and whisk for another minute. In a blender, combine pumpkin puree and milk, blending until smooth. Pour mixture into the saucepan and whisk until well combined. Cook, stirring frequently, until sauce thickens, 3-4 minutes. Remove from heat and add in shredded cheese, stirring until cheese melts.
Combine pasta and cheese mixture into an 9x9 baking dish or a pan similar in size. In a food processor, pulse together slices of bread and hazelnuts. With the food processor running, pour in olive oil. Sprinkle mixture over the macaroni and cheese.
Bake in the 400F oven for 20-25 minutes until the top is browning and cheese is bubbling. Serve warm.