Heat the oven to 180°C / 350°F. Line a 9x9 inch (23x23cm) square pan with baking parchment, leaving an overhang on two sides for easy lifting.
In a large bowl, whisk together the pumpkin puree, sourdough discard, egg, oil, maple syrup, brown sugar and vanilla until smooth and well combined. Blot visibly watery canned pumpkin with kitchen paper before measuring, this batter doesn't need extra moisture.
In a separate bowl, whisk the flour, baking powder, bicarbonate of soda, cinnamon, ginger, nutmeg, cloves and salt.
Fold the dry ingredients into the wet until just combined, no streaks of flour, but don't overmix.
Pour into the prepared pan and spread evenly right into the corners.
Bake for 26–30 minutes, until a skewer comes out with a few moist crumbs (not wet batter) and the edges just start to pull from the sides.
Cool completely in the pan on a wire rack before frosting.
Make the frosting:
Beat the softened butter, icing sugar and maple syrup together until light and fluffy, 2–3 minutes.
Add a third of the cream cheese, beat until smooth, scraping the bowl. Add the rest of the cream cheese and beat just until smooth, don't overbeat once the cream cheese is in. Chill 15–20 minutes if it's too soft to spread.
Spread frosting over the cooled bars. Chill for 30 minutes for cleaner slices, then slice into squares.
Notes
On the pumpkin puree: homemade puree tends to run wetter than tinned, not less. Blot it the same way if it looks glossy or pools liquid.On the frosting: if it turns soft while you're working, chill it for 15–20 minutes rather than adding more icing sugar, which will throw off the sweetness balance.Storage: keep covered in the fridge for up to 4–5 days. Sit at room temperature for 10–15 minutes before serving if you prefer them softer. To make ahead, freeze the bars unfrosted for up to 2 months, thaw overnight in the fridge and frost once fully defrosted.