Place the onion and garlic in a baking sheet under the broiler. Char for 9 to 10 minutes, flipping once in between. Once they are soft and charred, remove from the heat. When the garlic is cool, peel.
In an already hot skillet or comal set over medium-low heat, toast the ancho chilies for about 15 to 20 seconds per side, until they brown and crisp without burning. Place toasted ancho chilies in a bowl covered with boiling water. Soak for 10 to 15 minutes until they are plumped up and rehydrated. In the same skillet or comal, toast the cloves and all spice until aromatic, about a minute. Remove from the heat. Toast the almonds and cinnamon, stirring often, until lightly browned, 4 to 5 minutes. Place the onion, garlic, chilies, ½ cup of chili soaking liquid, almonds, cloves, cinnamon and allspice in the blender and puree until smooth. In a soup pot or casserole, heat the oil and pour the pureed mixture over medium heat. Add the salt and sugar. Cook for about 8 minutes, stirring frequently to help prevent the sauce from sticking to the bottom of the pan. The color will darken considerably. Add the pumpkin puree and chicken broth to the sauce. Stir well until the pumpkin puree has dissolved, it will have a silky consistency. Continue to cook for about 15 minutes, stirring occasionally. Use the mole sauce to pour over grilled, broiled or boiled chicken, meat or fish. Sprinkle with toasted pumpkin seeds for some added flavor and crunch.