Preheat oven to 180°C. Line a baking tray with baking paper. Place pumpkin pieces on lined tray. Spray with olive oil spray. Bake for 15 mins or until tender.
Meanwhile, grease a 20cm x 30cm lamington pan and line with baking paper, allowing the sides to overhang. Heat 1 tsp of the oil in a medium frying pan over medium heat. Cook the onion, stirring, for 5 mins or until onion softens. Set aside for 5 mins to cool slightly.
Use a sharp knife to cut down the side of the corn to release the kernels.
Combine the zucchini, carrot, grated pumpkin, sweet potato, flour, cheddar, half the corn and half the roasted pumpkin in a large bowl.
Whisk egg, milk and remaining oil in a small bowl. Add to zucchini mixture. Stir to combine. Season. Spoon into the prepared pan and smooth the surface. Sprinkle with the remaining corn and roasted pumpkin.
Bake for 40 mins or until the slice is firm to the touch. Serve warm or at room temperature.