Step 1Heat the oven to 400 degrees. Remove any discolored outer leaves and the brown bases from the endive heads. Cut the heads in half lengthwise or in quarters if they are very thick.
Step 2Generously butter an 11- by 7-inch baking dish. Arrange the endive in the baking dish in two overlapping layers. Sprinkle with sugar, season with one-half teaspoon salt, add the wine and dot with butter. Cover tightly with aluminum foil and bake until the endive is tender, about 30 minutes.
Step 3Remove the foil and return the baking dish to the oven. Bake until the liquid has mostly evaporated and the endive is beginning to brown, about 15 to 20 minutes.
Step 4In the meantime, whip the cream to soft peaks then stir in the egg yolk. Add one-fourth teaspoon salt. When the endive is browned, pour the whipping cream mixture over the top, distributing it evenly. Scatter one-fourth cup walnuts evenly over the top. Bake until the topping is puffed and golden, about 15 to 17 minutes.
Step 5To serve, sprinkle the remaining 2 tablespoons walnuts on top and serve immediately.