01 - Preheat the oven to 375°F. Generously grease a 9x13-inch baking dish with butter.
02 - Melt 2 tablespoons of butter in a large saucepan over medium heat. Add the minced garlic and sliced onions; sauté until softened and fragrant, approximately 3 minutes.
03 - Pour in the heavy cream, whole milk, fresh thyme, nutmeg, salt, and pepper. Stir gently and heat the mixture until just steaming, then remove from heat immediately.
04 - Arrange half of the sliced potatoes, parsnips, carrots, and squash in the bottom of the prepared dish. Season the layer lightly with salt and pepper.
05 - Sprinkle half of the grated Gruyere cheese evenly over the first layer of vegetables.
06 - Add the remaining vegetables in a second layer, followed by the remaining Gruyere cheese.
07 - Pour the warm cream mixture evenly over the entire dish, ensuring the liquid penetrates the layers.
08 - If desired, sprinkle the breadcrumbs evenly over the top of the gratin for a crispy crust.
09 - Cover the dish tightly with aluminum foil and bake for 40 minutes. Remove the foil and continue baking for an additional 20 minutes, or until the top is golden brown and the vegetables are tender.
10 - Allow the gratin to rest for 10 minutes before serving to set the structure. Garnish with extra fresh thyme leaves.