Preheat oven to 375°F. Grease a 9x13-inch baking dish and set aside.
Set a medium saucepan over moderate heat with 3 tablespoons of the butter. Once melted, add the onion and garlic and cook, stirring often, until softened, about 3 to 5 minutes.
Sprinkle in the flour and cook for about 30 seconds or so. Slowly whisk in the milk and heavy cream. Season with salt, pepper, granulated garlic, granulated onion, paprika, chili powder and nutmeg. Stir in the pumpkin and cook over low heat, until somewhat thickened. Remove from the heat and stir in ½ cup of Gouda, ½ cup of Fontina, parmesan, and thyme leaves until melted through.
Spread a ladleful of the sauce onto the bottom of the baking dish. Layer with some of the potato slices until the bottom is fully covered. Pour over a third of the sauce, spreading out evenly. Repeat 2 more times until all the potatoes and the sauce are used up.
Sprinkle the top with the remaining Gouda and Fontina cheese. Dot the top with bits of the remaining 2 tablespoons of butter. Cover with foil and bake for 1 hour and 20 minutes. Remove the foil and continue to cook for another 5 minutes or until golden brown. Garnish with fresh thyme and serve.