Preheat oven to 375 F and grease a 9-by-13 casserole dish.
In a large pot, bring 6 cups of the chicken stock to a boil.
Gradually pour in polenta, stirring to avoid clumps. Turn heat to low and when stock has been mostly absorbed, add 1/2 cup of stock and stir.
Continue adding stock, 1/2 cup at a time, allowing the polenta to absorb the stock each time before adding more.
Continue cooking polenta for about 30 minutes, stirring occasionally. Stir in 2 tablespoons of butter.
While the polenta is cooking, in a large skillet, melt remaining 2 tablespoons of butter with olive oil over low heat. When hot, add onion and turn to coat in fat.
Cook onions slowly, turning regularly, for about 30 minutes until they are very soft and golden brown.
Add mushrooms to the onions and cook for about 10 minutes, just until they have released their liquid.
Add garlic to the mushrooms and onions and cook for another minute.
Add wine and cook for 5 minutes to allow the alcohol to cook off.
Add baby kale to the pan and cook until just slightly wilted.
Pour the polenta into the bottom of the prepared casserole dish and spread into an even layer.
Arrange vegetable mixture evenly over the polenta.
Top with goat cheese and ricotta cheese.
Place in the preheated oven and bake for 20 minutes until cheese is soft and just starting to brown.
Remove from oven, sprinkle with fresh basil leaves, and serve.