Make the Crust: Combine flours and salt in the work bowl of a food processor and process to combine. Scatter butter cubes over the top of the flour mixture and pulse until mixture resembles coarse sand with a few pea-sized pieces of butter here and there, about 10 pulses. Transfer the mixture to a bowl and sprinkle the ice water over the top. Mix with a fork and/or your fingers until no dry spots remain and the dough holds together when squeezed.
Transfer the dough to a piece of plastic wrap. Gather into a ball and press into a disk, about 5 inches in diameter. Chill for at least one hour or up to two days before rolling.
Roast the squash: Preheat the oven to 425 degrees. Place the squash cubes on a rimmed baking sheet in an even layer. Toss with 1 tablespoon of olive oil and season with salt and pepper. Roast until tender and lightly browned, about 25 minutes. Set aside to cool.
Meanwhile, caramelize the onions: Heat 1 tablespoon of oil in a large skillet over medium heat. Add onions and a pinch of salt. Reduce heat to medium-low and cook until onions are golden brown and melty, about 20 minutes. (If the bottom of the pot is getting too dark while the onions cook, add a splash of water, scrape up the brown bits and keep cooking.) Season to taste with salt and pepper and set aside to cool.
Reduce the oven temperature to 375 degrees. Transfer the chilled dough round to a piece of parchment paper. Dust the top of the dough round with flour to prevent sticking. Using a rolling pin, roll into a 12 inch circle. Trim the edges with a pizza wheel if desired. Transfer to an inverted baking sheet leaving parchment paper in place. Place in the refrigerator for 20-30 to firm up slightly.
Meanwhile, combine the cooled squash, caramelized onions and thyme in a large bowl. Remove the dough round from the refrigerator and place the dough round and parchment inside the rimmed baking sheet. Brush the mustard over the surface of the dough, leaving a 1 ½ inch border around the edges. Sprinkle gruyere cheese in an even layer over the mustard.
Arrange the squash and onion filling over the top in an even layer, continuing to leave a 1 ½ inch border around the edge. Sprinkle with parmesan.
Fold the border of the dough inward over the squash mixture so that it covers the filling by about 1 inch, overlapping the dough every couple of inches. Gently press dough so that it adheres. Whisk the egg and 1 tablespoon of water together in a small bowl. Brush the border with egg wash.
Bake until the crust is golden brown, about 50 minutes. Transfer the baking pan to a wire rack to cool slightly. Sprinkle with parsley. Cut into wedges and serve.