To prepare the polenta, preheat your broiler and butter an 8-inch square pan.
Using a broiler pan, broil the corn-on-the-cob about 4 inches from the heat, turning it now and then, until it is lightly browned on all sides. This should take about 10 minutes.
Cool the corn and cut the kernels from the cobs.
In a large saucepan, stir the milk and polenta together and add the corn kernels and butter. Bring the mixture to a boil. Reduce the heat and simmer, stirring constantly. Be sure to stir the mixture continuously or the mixture will stick and burn.
Add water, just 1 scant tablespoon at a time, if the mixture becomes too thick. Continue stirring about 20 minutes, then pour the polenta into the greased baking pan. Spread the mixture evenly across the bottom of the pan, and allow to cool.
Chill the polenta in the refrigerator for about 2 to 3 hours, or until it is cold.
This part of the recipe can be made ahead of time and kept refrigerated for about 2 days.
To prepare the mushrooms:
slice the hen-of-the-woods mushrooms and sauté them in a 10-inch skillet with butter over medium high heat.
Add the shallots and continue to sauté and stir. Add salt to taste.
When the mushrooms begin to brown, add the broth and boil until the liquid is reduced by about half. Remove the skillet from the heat, add the thyme, pepper, and salt to taste. Keep warm.
Unmold the polenta onto a cutting board and cut into 16 triangles.
On a lightly oiled baking sheet, bake the polenta pieces until they are heated through. This should take about 10 to 15 minutes.
After baking, turn the broiler on and broil the pieces about 4 inches from the heat, or until they turn golden brown. This should take only about 2 minutes. Watch the pieces carefully, as they can burn very easily.
Arrange the polenta pieces on 8 plates, spooning the mushrooms over the polenta. Garnish with the walnuts.