Arrange squash halves, cut sides down, in an oiled shallow baking pan and put potatoes alongside. Roast vegetables in middle of oven until squash is tender, about 25 minutes. Transfer squash to a cutting board and potatoes to oven rack, then continue to roast potatoes until tender, about 12 minutes more.
When cool enough to handle, scrape flesh from squash, discarding skin, then force flesh through ricer into a bowl. Measure out 3/4 cup purée and put in another bowl (reserve remainder for another use). Remove skin from potatoes while still hot and force flesh through ricer into bowl with squash. Spread squash-potato purée in another shallow baking pan and cool completely.
Return purée to bowl and stir in egg, cheese, thyme, sage, salt, white pepper, and nutmeg. Add flour, then gently knead dough by hand 1 minute (it will be soft and slightly sticky).
Turn dough out onto a floured cutting board and cut into 3 portions. Gently roll each portion into a long log about 3/4 inch thick. Cut each log into 3/4-inch pieces with a floured knife.
Press a piece of dough against tines of a floured fork and push with a floured thumb in a forward motion toward end of tines, letting gnocchi fall from fork onto a floured kitchen towel. Repeat with remaining pieces of dough.
Prepare confit: Cook duck legs, skin sides down, in batches in a large heavy skillet over moderate heat, turning once, until browned and some of fat is rendered, about 5 minutes. Transfer duck to cleaned cutting board, then discard all but 1 tablespoon fat from skillet, reserving skillet.
When duck is cool enough to handle, discard skin and bones, then pull meat into 1/4-inch-thick pieces.
Cook gnocchi, chard, and duck: Melt 3 tablespoons butter in a 12-inch heavy skillet and remove from heat. Cook gnocchi in 3 batches in a 6-quart pot of boiling salted water, stirring occasionally, until centers are cooked through, about 3 minutes. (Gnocchi will float to top after about 1 1/2 minutes.) Transfer as cooked with a slotted spoon to butter in skillet.
Melt remaining 2 tablespoons butter in a 3- to 4-quart heavy saucepan over moderate heat, then stir in chard and salt. Cook, covered, just until wilted, 2 to 3 minutes.
While chard is wilting, heat reserved duck fat in skillet over moderately high heat until hot but not smoking, then sauté duck, stirring frequently, until lightly browned, 2 to 3 minutes.
Add chard, including any cooking liquid, and duck to gnocchi and cook over moderate heat, tossing gently, until heated through. Serve sprinkled with cheese.
Cooks' note: Squash-potato purée can be made 1 day ahead, cooled completely, then chilled, covered. Bring to room temperature before proceeding.