Preheat the oven to 180°C.
Bring the milk and garlic to the boil in a saucepan over a medium heat. Remove and allow to infuse to one side. Grease and line a 7 inch x 7 inch springform cake tin with nonstick baking paper. Pour a little of the infused milk onto the base, then layer the sweet potato and pumpkin in the prepared cake tin on top.
Once you have layered half of the vegetables, pour more of the milk on top and then continue to layer the rest of the vegetables. Finish by pouring the rest of the milk on top. Cover the tin with foil and bake for one hour. Remove the foil after one hour and continue to bake for a further 10-15 minutes until the top is browned. Remove and allow it to sit in a warm place for 10 minutes.
Meanwhile, melt the butter in a frying pan over a medium heat, then add the shallot and fry for 5-7 minutes until golden and starting to turn crispy. Turn the bake out onto a chopping board and cut into rectangular portions.
Serve on slates and garnish the tops with some of the shallot before serving.