01 - Preheat oven to 375°F. Grease a 9x13-inch baking dish with butter.
02 - Peel and thinly slice all vegetables: Yukon Gold potatoes, parsnips, carrots, rutabaga, and leek (using white and light green parts only).
03 - In a medium saucepan, melt 2 tablespoons butter over medium heat. Add flour and whisk constantly for 1 minute to form a smooth roux.
04 - Gradually whisk in the whole milk, stirring continuously until the sauce thickens, approximately 5 minutes. Season with nutmeg, sea salt, and black pepper. Remove from heat.
05 - Arrange half of the sliced vegetables evenly in the prepared baking dish. Pour half of the sauce over the vegetables and sprinkle with half of the Gruyere cheese.
06 - Layer the remaining vegetables on top. Pour the remaining sauce evenly over the vegetables, then sprinkle with the remaining Gruyere and all of the Parmesan cheese.
07 - In a small bowl, combine fresh breadcrumbs with melted butter and thyme leaves if using. Mix until evenly distributed.
08 - Sprinkle the breadcrumb mixture evenly over the gratin. Cover with aluminum foil and bake for 35 minutes.
09 - Remove the foil and continue baking for an additional 15 minutes, or until the top is golden brown and vegetables are tender when pierced with a fork.
10 - Allow the gratin to stand for 10 minutes before serving to set the layers and improve texture.