Preheat the oven to 200°C/390°F, or 180°C fan-forced.
Mix the egg, garlic, salt, and pepper. Stir in the spinach, ricotta, cheddar, and Parmesan until combined.
Cut each puff pastry sheet into nine equal squares, making 18 squares total.
Generously oil 18 cups of two standard muffin tins.
Press one pastry square into each muffin cup.
Divide the filling among the pastry cups.
Bring the four pastry corners toward the center and pinch them together, leaving some filling visible.
Lightly brush the pastry tops with egg yolk, keeping yolk off the sides.
Bake for 25 minutes, or until deeply golden and crisp; the partly filled tin may need about five extra minutes.
Rest the puffs for five minutes before removing them, then serve warm or at room temperature.