Preheat your oven to 400°F (200°C) and line a baking sheet with parchment paper.
In a large bowl, combine the cooked spinach, diced ham, shredded cheddar cheese, cream cheese, garlic powder, onion powder, salt, and pepper. Mix until well combined.
Roll out the puff pastry on a lightly floured surface and cut it into squares, approximately 4x4 inches.
Place a tablespoon of the filling in the center of each puff pastry square.
Fold the corners of the pastry over the filling to create a pocket and pinch the edges to seal. Brush the tops with beaten egg.
Place the filled puffs on the prepared baking sheet and bake for 15-20 minutes, or until golden brown.
Remove from the oven and let cool slightly before serving.