Meanwhile, preheat oven to 220°C/200°C (fan-forced). Line a baking tray with baking paper.
Working inside the pastry square, score a smaller square approx. 1-1 ½ cm from the edge. Prick middle of pastry several times with a fork. Bake 10 minutes. Pastry should have browned and puffed up.
Push down cooked pastry centre and spoon over cheesy sauce leaving the pastry border free. Dollop over pesto and arrange mushrooms over the top, leaving room for the eggs to nest in.
Crack an egg into each space and season with salt and pepper. Bake 10-12 minutes or until eggs white are cooked and yolks still runny. Stand for 5 minutes. Cut into 4 large squares, serve warm.