Preheat the oven to 200°C/390°F, or 180°C fan-forced.
Mix the egg, garlic, salt, and pepper. Add the spinach, ricotta, cheddar cheese, and parmesan, and stir until combined.
Cut each puff pastry sheet into 9 equal squares, making 18 squares in total.
Generously oil 18 holes in two standard muffin tins.
Press one pastry square into each muffin cup, divide the filling among them, bring the four corners toward the center, and press gently to seal while leaving a little filling visible.
Brush the pastry lightly with egg yolk and bake for about 25 minutes, until deeply golden and crisp.