Preheat your oven to 400°F (200°C) and line a baking sheet with parchment paper.
In a large mixing bowl, combine the chopped spinach, diced ham, shredded cheddar cheese, cream cheese, garlic powder, onion powder, salt, and black pepper. Mix until well combined.
On a lightly floured surface, roll out the thawed puff pastry sheets. Cut each sheet into 4 squares.
Place a generous tablespoon of the filling in the center of each pastry square. Fold the corners of the pastry over the filling to create a triangle or rectangle shape, pressing the edges to seal.
Transfer the filled puffs to the prepared baking sheet. Brush the tops with the beaten egg to give them a golden color when baked.
Bake in the preheated oven for 15-20 minutes, or until the puffs are golden brown and flaky.
Let cool for a few minutes before serving.