Brown the mushrooms. Heat the oil and butter in a large skillet over medium-high heat. Add the mushrooms in two batches so they brown instead of steam, cooking each batch 5 to 6 minutes until deeply golden and dry. Dry mushrooms mean crisp pastry.
Add the onion and garlic. Return all the mushrooms to the pan and add the onion; cook 3 minutes until soft. Stir in the garlic, thyme, and rosemary and cook 1 minute more, until fragrant.
Season the filling. Stir in the soy sauce, balsamic vinegar, salt, and black pepper. Cook for 1 minute, then take the pan off the heat and stir in the walnuts and panko — the crumbs soak up any last moisture and help the filling hold together.
Cool the filling. Spread the mixture on a plate and let it cool to room temperature, about 20 minutes. A warm filling melts the pastry, so do not rush this.
Wilt the spinach. In the same skillet, cook the spinach over medium heat for about 1 minute, just until wilted. Squeeze it very dry in a clean kitchen towel — wet spinach makes soggy pastry.
Roll out the pastry. On a lightly floured sheet of parchment, roll the puff pastry into a rectangle about 12 by 14 inches. If it gets soft and sticky, chill it for 10 minutes.
Layer the filling. Spread the Dijon mustard down the center in a strip about 5 inches wide. Lay the spinach over it, then shape the cooled mushroom mixture into a firm log on top.
Wrap it up. Fold one long side over the filling, then the other, pressing the seam to seal. Trim the ends, fold them under, and flip the Wellington seam-side down. Score the top lightly and chill for 20 minutes.
Bake until golden. Brush the Wellington with the beaten egg and sprinkle with flaky sea salt. Bake at 400°F for 35 to 40 minutes, until deeply golden and puffed. If the top browns too fast, tent it loosely with foil.
Rest and slice. Let it rest for 10 minutes before slicing, so the filling does not crumble. Slice with a sharp serrated knife and serve warm.