In a large nonstick skillet, heat over medium-high. Add the onion and cook until softened, about 2 minutes. Stir in the spinach, garlic powder, and half of the salt and pepper, cooking for 3 minutes while stirring constantly. Mix in the cream cheese and cook until it melts, then remove from heat. Fold in the feta cheese, dill, lemon juice, and zest, then set the mixture aside.
Preheat your oven to 400°F (200°C) and line a baking sheet with parchment paper to prevent sticking and ensure even baking.
On a lightly floured surface, roll out one sheet of puff pastry to a size slightly larger than the salmon fillet. Spread half of the spinach mixture onto the pastry, shaping it to match the fillet. Place the salmon on top, seasoning with the remaining salt and pepper. Layer the rest of the spinach mixture over the salmon, then top with the second sheet of puff pastry. Trim any excess pastry and fold the edges over the salmon, pressing them together to seal the filling inside.
Place the wrapped salmon onto the prepared baking sheet and brush the surface evenly with the beaten egg for a golden, glossy finish.
Bake in the preheated oven for about 30 minutes, or until the pastry is golden brown and the salmon is fully cooked. To check, insert an instant-read thermometer into the center of the salmon; it should register 145°F (63°C). Allow the dish to rest for 5 minutes before serving.