Preheat oven to 350 degrees Fahrenheit. Generously grease a 9 x 13 inch baking dish with unsalted butter. Set to the side.
In a large sauté pan or cast iron skillet, heat 2 tablespoons olive oil over medium heat. Add the shallots and celery and cook until softened, about 5 minutes. Add the mushrooms and the remaining oil. Cook until they cook down and much of their liquid evaporates, another 5 to 7 minutes. Season with the salt, pepper, and crushed red pepper (if using).
Add the garlic and stir for one minute until fragrant. Add the fresh herbs and spinach. Cook to wilt the spinach, about 5 minutes more. Set to the side to cool slightly.
Cut the sourdough bread cubes into small ½ inch pieces. For added texture, you could opt to tear the bread into small pieces. Add to a large mixing bowl.
In a small mixing bowl, whisk together the egg and cup of stock until well combined.
To the large bowl with bread cubes, add the mushroom and spinach mixture. Stir to combine. Pour the egg and stock mixture over the stuffing and stir to coat the stuffing in the liquid mixture.
Pour stuffing into the prepared baking dish. Baked for 35 to 45 minutes until edges are golden brown.