Heat butter in large skillet set over medium heat. Add onions, salt, pepper and sugar. Cook, stirring often, 15 to 20 min. until golden brown. Stir in sage and rosemary; cook 2 min. until fragrant. Cool completely.
Preheat oven to 220°C (425°F). Dust work surface with flour. Roll puff pastry into 12 x 10-in. (30 x 25-cm) rectangle, about 1/4-in.(5-mm) thick. Transfer pastry onto parchment paper-lined baking sheet. Using the tip of paring knife, score a 1-in. (2.5-cm) border around edges. Prick pastry (except border) every couple inches with fork. Spread onion mixture inside border. Scatter squash overtop.
Bake about 20 to 25 min., until squash is tender and pastry is golden. Remove from oven. Sprinkle with cheese and walnuts. Cool on wire rack about 10 min. before slicing. Serve warm or at room temperature.
Add torn pieces of prosciutto onto tart after baking for a heartier dish.
Serves 10 as an appetizer.