Cut the pumpkin or squash in half lengthwise and remove the seeds and fibers. Cover with aluminum foil and place the halves, cut side up, in a foil-lined shallow baking pan. Bake for 40 to 50 minutes, or until easily pierced with a knife but still firm (if using squash, prepare the same way). When cool enough to handle, scoop out the pulp, and cut into large dice. Set aside until needed.
Heat the oil in a soup pot. Add the onion and sauté over medium-low heat until translucent. Add the garlic and continue to sauté until the onion is golden.
Add the pumpkin and all the remaining ingredients except the last 2 and bring to a simmer. Simmer gently, covered, until all the vegetables are tender, about 20 to 25 minutes. Season to taste with salt and pepper.
If time allows, let the stew stand for 1 to 2 hours before serving, then heat through as needed. Just before serving, stir in the cilantro. The stew should be thick and very moist but not soupy; add additional stock or water if needed. Serve in shallow bowls.