In a 6-quart pot, sauté onions in butter over low heat. Stir occasionally, until softened, about 3 to 5 minutes. Add garlic and ginger to onions and stir for about 1 minute. Season with cumin, coriander, and cardamom, stir for another minute. Add salt and red pepper flakes, pumpkin, water, vegetable stock and coconut milk. Bring to a simmer, uncovered, stirring occasionally, for 30 minutes.