Pulse the flour, sugar, salt, and herbs together in a food processor until combined.
Add in the cubed butter, and pulse a few more times until the dough forms small crumbs.
Drizzle in the water and pulse 2-3 more times until the dough just starts to come together.
Pour the dough onto the counter and knead it lightly just to bring it together and form a rough ball. Flatten it into a 1" disc and wrap it in plastic wrap.
Refrigerate for at least 30 minutes.
Heat the olive oil in a large pot over medium heat. Add the shallot and garlic and cook on low heat for about 10 minutes, until the shallot is soft and the garlic is just starting to brown.
Add the mushrooms and turn up the heat to medium. Season with salt and pepper and cook the mushrooms for about 10 minutes, stirring occasionally, until the mushrooms are soft but not dry.
Add in the chopped spinach and the herbs. Cook for about 3 minutes, so that the spinach wilts.
Remove the pan from heat and cool for about 20 minutes.
Meanwhile, preheat oven to 425 F. Line a baking sheet with parchment paper and set aside.
Roll the cold pie dough into a circle on the counter until it's about 12" wide. It doesn't have to be perfect and pretty, just flat!
Transfer the pie dough onto the baking sheet. I find it's easiest to do this by wrapping the dough around the rolling pin and then unravelling it on the baking sheet.
Spread the soft cheese onto the pie dough, leaving a 1" space around the edges.
Top the cheese with the mushroom and spinach mixture.
Gently fold the edges of the pie crust on top of the mushroom and spinach mixture so it covers them slightly, and brush the pie crust with the egg wash.
Sprinkle the shredded white cheddar cheese on top of the crust.
Bake for 25-30 minutes until the edges are brown, and the filling is bubbling.
Remove from the oven and serve with a drizzle of olive oil, a sprinkling of herbs, and a few pinches of salt, pepper, and red pepper flakes.