Preheat the oven to 180°C/160℃ fan/350°F/gas mark 4. Grease a 23 cm/9 in square cake tin and line with a strip of baking parchment, leaving the ends overhanging so that it is easy to lift the cake out.
To make the crumble topping, stir together the flour, sugar and cinnamon in a bowl, add the butter and rub in with your fingertips until the mixture resembles breadcrumbs and no lumps of butter remain. Mix in the chopped pecans (if using) and squeeze the mixture together with your hands so that it forms small clumps, set aside.
Whisk together the flour, pumpkin spice, baking powder, bicarbonate of soda, salt, light brown soft sugar and caster sugar in a large bowl.
Add the pumpkin puree, oil, milk, vinegar and vanilla extract and stir with a balloon whisk until smooth and no dry lumps remain. Do not over-beat the batter.
Pour the batter into the prepared tin and spread level. Sprinkle over the crumble topping evenly and very gently pat it down slightly.
Bake for 55-60 minutes until firm and a skewer inserted into the centre comes out clean. Cover loosely with tin foil partway through cooking if the top begins to colour too much.
Allow to cool in the tin for about 20 minutes then use the overhanging parchment to carefully lift the cake out of the tin and place it on a wire rack to cool completely. Once cool, store in an airtight container.