Preheat oven to 375 degrees F.
Heat oil in a large non-stick frying pan over medium heat. Add onion and garlic and cook, stirring occasionally, until softened, about 5 minutes.
Add spinach and cook, stirring occasionally, until wilted, about 3 minutes. Remove from heat and let cool.
Unroll puff pastry on a lightly floured surface and cut into 4 equal squares.
In a medium bowl, combine cooled spinach mixture, feta, ricotta, Parmesan, egg, salt, and pepper. Mix until well combined.
Place 1/4 of the spinach mixture in the center of each puff pastry square. Fold the corners of each square in towards the center to form a galette and press the edges to seal. Transfer to a baking sheet lined with parchment paper.
Brush the top of the galettes with beaten egg. Bake for 25-30 minutes, until golden brown.
Remove from oven and let cool before serving.