Preheat your oven to 375°F (190°C). Lightly butter a baking dish.
Evenly layer half of the sliced zucchinis and yellow squashes in the dish. Sprinkle half of the sliced onions and minced garlic over the vegetables. Season with salt, pepper, and a pinch of thyme.
Repeat the layering with the remaining zucchinis, yellow squashes, onions, and garlic. Season again with thyme, salt, and pepper.
In a small saucepan, heat the heavy cream over medium-low heat until it just begins to simmer. Pour the hot cream evenly over the layered vegetables.
Sprinkle half of the Parmesan and Gruyere cheeses over the vegetables.
In a small bowl, combine the breadcrumbs with the remaining cheeses. Spread the breadcrumb mixture evenly over the top.
Cut the butter into small pieces and dot them over the top.
Cover the dish with aluminum foil and bake for 20 minutes. Remove the foil and bake for an additional 15 to 20 minutes, or until the vegetables are tender and the top is golden brown.
Allow the gratin to rest for a few minutes before serving. Enjoy warm.
Variations and Tips:
For a lighter version, substitute heavy cream with low-fat milk or half-and-half.
Consider adding herbs such as basil or rosemary for enhanced flavor.
A pinch of nutmeg in the cream mixture can add a delightful aromatic note.
Experiment with other cheeses like mozzarella or cheddar if you prefer a different cheese blend.
For a gluten-free version, replace the breadcrumbs with gluten-free crackers or omit them entirely.