Prick the pumpkin all around with a fork. Place on a baking tray and cook in a preheated oven (electric cooker: 175 °C/ circulating air: 150 °C/ gas: see manufacturer) for about 30 minutes.
In the meantime, peel and dice the onions. Clean the chilli, cut lengthwise, wash and remove the seeds. Cut the pod into small pieces. Peel sweet potato and cut into cubes.
Take the pumpkin out of the oven, let it cool down a little, cut it in half, remove seeds and skin. Cut the flesh into cubes.
Heat the oil in a pot. Sauté onion and half of the chillies in it while turning until transparent. Add pumpkin and potato cubes and pour on broth. Simmer at low heat for about 20 minutes.
Puree finely with the cutting stick. Serve the soup and sprinkle with the remaining chilli.