Preheat the oven to 400°F (200°C).
In a large skillet, heat olive oil over medium heat. Add the onions and garlic, sautéing until softened.
Add the chopped mushrooms to the skillet, cooking until all moisture evaporates and the mixture is dry.
Stir in the minced rosemary, chopped pecans, and balsamic vinegar. Cook for another 2-3 minutes.
Remove the filling from heat, season it with salt and pepper, and let it cool.
Roll out the thawed puff pastry on a floured surface to smooth out any creases.
Spoon the mushroom mixture in the center of the pastry, shaping it into a log.
Fold the pastry over the filling, pinching the edges to seal tightly.
Place the Wellington seam-side down on a baking sheet. Brush the top with the egg wash.
Bake for 25-30 minutes or until golden brown.
Allow the Wellington to rest for 10 minutes before slicing.