Preheat the oven to 190°C. Toss the pumpkin chunks with the oil and spread in a single layer in a baking dish or on a lined tray. Roast for 25–30 minutes, turning once, until tender and lightly caramelised at the edges.
Transfer the roasted pumpkin to a bowl and blend with about 50 ml water until completely smooth. Measure out 125 g of pumpkin purée; reserve any extra for another use.
In a small dry pan over medium heat, toast the cinnamon stick, cloves, allspice berries and mace for 1–2 minutes, stirring occasionally, until fragrant. Remove from the heat and lightly crush the spices with a mortar and pestle or the back of a spoon.
Split the vanilla pod and scrape out the seeds. Add the pumpkin purée, brown sugar, 250 ml water, crushed spices, sliced ginger, grated nutmeg, vanilla seeds and pod, and a pinch of salt to a saucepan. Stir well to dissolve the sugar.
Bring to a gentle simmer over medium-low heat. Cook for 10–12 minutes, stirring occasionally, until slightly thickened and the syrup coats the back of a spoon. If it looks too thick, whisk in 1–2 tbsp hot water; if too thin, simmer for a few minutes longer.
Remove the vanilla pod. Pour the mixture through a fine mesh sieve or muslin cloth set over a bowl. Press lightly with a spoon to extract more liquid; a little sediment is fine for a more rustic finish. For a clearer syrup, allow it to drain without pressing.
Transfer the strained syrup to sterilised bottles or jars. Let cool completely, then seal and refrigerate for up to 3 weeks. Shake before use, as some natural separation may occur.