How to Make It
Preheat the oven to 375°. In a small saucepan or skillet, cook the garlic with 1/2 cup of the olive oil over moderately low heat until the garlic is softened, about 15 minutes. Transfer the garlic to a small bowl and mash to a paste. Reserve the oil for another use.
Spread the hazelnuts in a pie plate and toast for about 12 minutes, until fragrant. Transfer to a clean kitchen towel and let cool slightly, then rub together to remove the skins. Coarsely chop the hazelnuts.
On a large rimmed baking sheet, toss the squash with 2 tablespoons of olive oil; season with salt and pepper. Arrange in a single layer and bake for about 30 minutes, until softened and golden. Leave the oven on.
Meanwhile, lightly grease eight 8-ounce ramekins or gratin dishes with olive oil and arrange on a large rimmed baking sheet. In a large saucepan, heat the remaining 2 tablespoons of olive oil. Add the cabbage, season with salt and cook over moderate heat, stirring occasionally, until wilted, 10 to 12 minutes. Transfer the cabbage to the prepared ramekins and top with the roasted squash.
In a medium saucepan, heat the milk with the mashed garlic over moderate heat until it just comes to a boil. Add the cornstarch slurry, whisking until thickened, about 1 minute. Whisk in the cheese and herbs and season with salt and pepper. Pour the sauce evenly into the ramekins. Bake in the center of the oven for about 30 minutes, until bubbling.
Turn the broiler to high. Transfer the baking sheet with the ramekins to the top rack of the oven and broil 6 inches from the heat source for about 2 minutes, until the squash is browned in spots. Sprinkle with the chopped hazelnuts and serve.
The gratin can also be baked in a 3-quart shallow baking dish.