1Preheat oven to 180°C if fan-forced (200°C conventional).
2Place pumpkin cubes on a greased oven tray and roast for 20 minutes or until soft and lightly browned.
3Meanwhile, to make caramelised onion, heat oil in a large frying pan over low heat. Add onion and cook slowly, stirring occasionally, for 20 minutes or until very soft and lightly golden. Stir through balsamic vinegar and maple syrup and cook for a further 5 minutes or until caramelised.
4To make pastry, combine flours and salt in a large bowl. Add oil and water and mix just until combined. Turn out onto a floured surface and knead until dough just comes together.
5Using a rolling pin, roll dough large enough to line a 24 cm tart/pie tin. Carefully transfer to tart tin, trim edges and prick base all over. Rest for 30 minutes, then line with grease-proof paper and fill with ‘baking beans’ or dried chickpeas. Blind bake for 15 minutes, then remove the baking beans and paper and cook for a further 10 minutes.
6In a bowl, combine chickpea flour, water and oil and whisk until smooth. Stir through cheese, rosemary, salt and cayenne pepper. Check seasoning.
7Scatter roasted pumpkin and caramelised onion over the pastry base. Pour chickpea batter over them and bake for 15 minutes or until filling is set and pastry is golden brown.
8Serve warm, topped with extra rosemary or microherbs and cracked black pepper.