Preheat oven to 375°F with rack 10 inches from heat. Bring a large pot of salted water to a boil over high. Rinse and pat dry swiss chard. Remove stems from Swiss chard; trim and discard stem ends, and thinly slice remaining stems. Slice chard leaves into 1-inch-thick strips. Add leaves and stems to boiling water; cook, stirring often, until leaves are wilted and stems are crisp-tender, 1 to 2 minutes. Drain well in a colander. Let cool (will take about 20 minutes) Gently squeeze over the sink to remove any excess liquid. Set aside.
Add 1 tablespoon butter and 1 tablespoon oil to large skillet; cook over medium-high until butter melts. Add 1 package of gnocchi; cook, turning gnocchi occasionally, until golden brown and crisp, 5 to 7 minutes. Transfer to a baking sheet. Repeat process with 1 tablespoon butter, 1 tablespoon oil, and remaining gnocchi.
Add remaining 2 tablespoons butter and remaining 2 tablespoons oil to pot; cook over medium until butter melts. Add onion and mushrooms; Cook, stirring occasionally, until onion is softened and translucent and mushrooms are browned and soft, about 8 minutes. Add garlic, sauté 2 minutes. Deglaze pan with Sherry wine. Cook 2 minutes. Sprinkle onion mixture with flour; cook over medium, stirring constantly, 2 minutes.
Gradually whisk in cream, whisking to incorporate flour and cream. The sauce will thicken a bit and then add milk until smooth. Bring just to a simmer over medium-high, whisking occasionally. Reduce heat to low; gently simmer, whisking often, until mixture is thickened, about 5 minutes. Remove from heat. Add mustard, cayenne, and nutmeg Stir in Gruyère, Parmigiano-Reggiano. Taste and adjust the salt, adding more if necessary. Fold in gnocchi and Swiss chard. Taste again and add more salt and pepper if necessary. Spread mixture evenly into baking dish
Bake in preheated oven until bubbling around edges, 20 to 25 minutes. Increase oven temperature to 425 (Do not remove baking dish from oven.) Cook until browned in spots, about 4 minutes. Remove from oven; let cool slightly before serving.