Roast your garlic. Peel the paper off the garlic head; Chop the top of your garlic head and place the whole head in a tin foil, sprinkle with olive oil, salt and pepper, and roast at 400F for an hour. Once your garlic is roasted, remove it from the oven and let it cool off. Keep the oven hot at 400F.
Peel and cut your squash (unless you purchased pre-cut then skip this step). In order to make it easier to peel, cut the squash in half, place in a microwave for 2 minutes; let cool before peeling; then peel and cut into about 1-inch squares;
Place both squashes into a large pot with salted water and bring to boil; reduce to simmer and partially cover; cook squashes until fork-tender for about 20 minutes;
Peel the potatoes and sliced them in 1/4 inch thick slices; place potatoes in a pot of salted water, bring to boil, then reduce to simmer, cover and cook until tender for about 10 minutes;
Chop your onions, heat up a skillet, add some olive oil, onions and dry tyme; sprinkle with some salt and pepper and cook until onions are soft and translucent (for approx, 5 minutes); Squeeze out garlic cloves from the roasted garlic head and add them to the onions; break the garlic using wooden spoon and mix all together;
Drain your squashes in a colander and place back into a large bowl. Using a potato masher, roughly mash the squashes;
Add onions, thyme and garlic mixture into the bowl; add salt, pepper, fresh nutmeg and mix everything gently; check for seasoning and adjust as needed;
Once potatoes are fork-tender, drain them and to the bowl with squashes;
Transfer the squashes mixture into a 9x13 baking dish,
Pour milk over the squashes mixture;
Step 11: Shred your Gruyere cheese and place it on top of the milk;
Transfer the baking dish into the preheated oven to 400F and bake for 30 minutes until bubbly and golden brown;
Remove from the oven and let cool slightly before serving.