Preheat to 350 F. Have a spatula and greased 9” Tart pan or pie dish ready.
Put water, salt and butter in a sauce pan and bring to a boil. Start whisking and add polenta in a thin stream until incorporated. Switch to a spatula, drop heat to medium and cook out the polenta until it is thick and smooth (about 8 minutes). Turn off heat, stir in the egg yolk. Pour into the tart pan and let it cool for a couple minutes, then press into the tart ‘shape’. Place pan on a baking sheet and continue with the filling.
In a large skillet, heat oil and fry bacon over medium heat until just cooked. Remove to a paper towel lined bowl. Add onion and mushrooms and fry just till soft but not browned, and scatter over bottom of polenta shell, along with the bacon. Add a little more oil and soften the mushrooms, removing just before turning dark brown. Add them to the shell. Wilt the spinach for a couple of minutes until just soft. Scatter it over the shell. Finally, sprinkle the cheeses over the veg in the shell.
In a small bowl beat the eggs and half ‘n half and season with the salt and pepper. Pour mixture over filling. Bake off about 35-40 minutes until the custard is set and top is lightly browned.