Preheat the oven to 200°C/400F.
Peel and cube the butternut squash. Drizzle with olive oil and season with salt, pepper, chili flakes, and any herbs you desire. (thyme, basil, oregano). Roast for 30 minutes until tender.
Caramelize the thinly sliced onions by sautéing them over low heat in the butter, sugar, a pinch of salt, and a drizzle of olive oil. Stir occasionally and then more frequently as they start to brown in order to avoid burning them.
Line a pie dish or baking dish with the pastry dough. If you're using puff pastry, you might need to roll it out a a bit. Gently poke holes in the base of the dough using a fork.
Spread the Dijon mustard over the dough on the base of the dish. Fill the dough with the butternut squash, cheeses, sage, caramelized onions, and sage. Pour in the scrambled egg to fill any open space.
Bake for 30-40 minutes until the crust is golden brown. Serve warm with salad.