Make pastry: In a bowl, combine the flour and salt. Place the butter in another bowl. Place both bowls in the freezer for 1 hour. Remove the bowls from the freezer and make a well in the center of the flour. Add the butter to the well and, using a pastry blender, cut it in until the mixture resembles coarse meal. Make another well in the center. In a small bowl, whisk together the sour cream, lemon juice and water and add half of this mixture to the well. With your fingertips, mix in the liquid until large lumps form. Remove the large lumps and repeat with the remaining liquid and flour-butter mixture. Pat the lumps into a ball; do not overwork the dough. Cover with plastic wrap and refrigerate for 1 hour.
Prepare squash: Preheat oven to 375 degrees F. Peel squash, then halve and scoop out seeds. Cut into a ½-inch dice. Toss pieces with olive oil and a half-teaspoon of the salt and roast on foil lined (for neatness sake) sheet for 30 minutes or until pieces are tender, turning it midway if your oven bakes unevenly. Set aside to cool slightly.
Caramelize onions: While squash is roasting, melt butter in a heavy skillet and cook onion over low heat with the remaining half-teaspoon of salt and pinch of sugar, stirring occasionally, until soft and lightly golden brown, about 20 minutes. Stir in cayenne.
Raise the oven temperature to 400 degrees. Mix squash, caramelized onions, cheese and herbs together in a bowl.
Assemble galette: On a floured work surface, roll the dough out into a 12-inch round. Transfer to an ungreased baking sheet. Spread squash, onions, cheese and herb mixture over the dough, leaving a 1 1/2-inch border. Fold the border over the mushrooms and cheese, pleating the edge to make it fit. The center will be open.
Bake until golden brown, 30 to 40 minutes. Remove from the oven, let stand for 5 minutes, then slide the galette onto a serving plate. Cut into wedges and serve hot, warm or at room temperature.