In a separate pot, bring 3 cups of water to a boil.
Add salt and oil/butter.
Slowly add polenta, stir continuously with a whisk.
Lower heat and stir until mixture has thickened to be able to hold a spoon upright.
Spread thickened polenta over the bean and vegetable mixture.
Sprinkle parmesan on top if desired.
Bake covered for 25 minutes at 350°F, then 5 more minutes uncovered at 400°F.