Heat the olive oil in a large skillet over medium heat.
Add the spinach and cook for 2–3 minutes, stirring occasionally, until wilted.
Add the garlic and cook for another 30–60 seconds. Transfer the spinach to a plate and let it cool.
Squeeze the cooled spinach thoroughly to remove excess liquid, then chop it finely.
Combine the cream cheese, spinach, mozzarella, Parmesan, salt, and black pepper in a medium mixing bowl.
Place the puff pastry on a lightly floured surface and gently roll it into an even rectangle.
Spread the spinach filling evenly over the pastry, leaving a ½-inch border around the edges.
Starting from one long side, roll the pastry tightly into a log. Wrap and refrigerate for 20–30 minutes.
Preheat the oven to 400°F. Line a large baking sheet with parchment paper.
Cut the chilled pastry log into 12 equal slices. Place the slices flat on the prepared baking sheet, leaving approximately two inches between them.
Whisk the egg with one tablespoon of water. Lightly brush the exposed pastry with the egg wash.
Bake for 18–22 minutes or until the pastry is puffed and deeply golden.
Let the pinwheels cool on the tray for five minutes before serving.