This delicious recipe is courtesy of Rick Bayless.
Make the salsa: If using dried chiles, preheat a large nonstick skillet over medium heat. Add chiles and toast, turning frequently and pressing down with a flat spatula, until very aromatic, about 30 seconds. Transfer chiles to a small bowl and cover with hot water. Let sit until chiles are rehydrated, for 30 minutes, stirring frequently to ensure even soaking.
Place garlic and tomatillos in the skillet. Toast, turning occasionally, until soft and blackened in some spots, 3 to 4 minutes for the tomatillos and about 5 minutes for the garlic. Transfer garlic, tomatillos, and their juices to the bowl of a food processor or jar of a blender.
Drain chiles, either from the soaking water or their canning liquid, and discard liquid. Add chiles to the tomatillos and process to a fine-textured puree. Set aside.
If using fresh tomatoes, place tomatoes on a baking sheet and place baking sheet 4 inches below the preheated broiler. Roast until blackened on one side, about 6 minutes. Turn tomatoes over and roast on the other side, an additional 6 minutes. Let cool, then peel and roughly chop. Transfer tomatoes and any juices to a small bowl; set aside.
In a large heavy skillet, heat oil over medium-high heat. Add pork, if using, and onions; cook, stirring and scraping up browned bits of meat with a wooden spoon, until pork is nicely golden, about 10 minutes.
Add reserved salsa, tomatoes, and 3 to 4 tablespoons water; stir to combine. Add Swiss chard and season with salt. To make this dish ahead of time, cover and refrigerate sauce for up to 2 days, then continue cooking as follows.
Preheat oven to 350 degrees. Place pumpkin evenly in a 9-by-9-inch glass baking dish. Pour over pork mixture. Cover baking dish with foil and bake until pumpkin is tender, 40 to 45 minutes. Dish can be cooled and refrigerated at this point, if desired, then continue cooking as followed when ready to serve.
To continue cooking, uncover dish and raise the oven temperature to 400 degrees. Continue baking until sauce has reduced slightly and top becomes crusty, about 15 minutes. Serve immediately.