A savory layered vegetarian gratin featuring wild mushrooms, Gruyère cheese, and a rich custard baked in a bain-marie.