Prepare the dough – In a bowl, mix flour, baking powder, sugar, and salt. Add cold butter and rub it into the flour until crumbly.
Form the dough – Add the egg, cold water, and lemon juice (if using). Knead until smooth, then wrap in plastic and refrigerate for 20 minutes.
Prepare the filling – Heat olive oil in a pan, sauté onions until soft, then add spinach. Cook until wilted. Remove from heat and mix with vegan cheese, black pepper, garlic powder, and nutmeg.
Assemble the pie – Roll out the dough and place it in a greased pie dish. Spread the spinach and cheese filling evenly over the dough.
Bake – Preheat oven to 180°C (350°F) and bake for 25–30 minutes until golden brown.
Cool and serve – Let the pie rest for 10 minutes before slicing.