Grate the fresh pumpkin ahead to have it at hand. In a large enough pan put together the grated pumpkin, the icing sugar and the cinnamon. Place on medium heat and let it cook for 10 minutes until softens. Stir often.Turn off the heat and add the vanilla and chopped walnuts. Stir and place into a colander or strainer to release the excess moisture while cooling off completely. set aside.
Make the shortbread pastry dough. Mix the butter with the sugar until combined well. Add the egg, lemon zest, salt and baking powder. Mix until incorporated. Add the sifted flour and mix with a spoon to form the dough. Finish forming the pastry dough onto a working space dusted with flour, bringing all together quickly and forming a ball. Wrap in plastic foil and let it rest in the fridge for 30 minutes.
Preheat oven to 335 F. Line the baking pan with parchment paper. Divide the pastry dough in 2 and start rolling the first half into a rectangular shape about the size of the pan. Transfer gently into the pan and prick with a fork all over.Add the pumpkin filling and spread it well over the dough. Spread some semolina or breadcrumbs over to retain the moisture while baking. Roll out the remaining half and cover the filling. Prick again with the fork and transfer to the preheated oven.
Bake for 35-40 minutes until very slightly colored. Let it rest 10 minutes and decorate with more icing sugar. Let it cool completely, cut into squares and serve. These pumpkin squares / bars are delicious both warm or cold.Preserve leftovers into a airtight container in the fridge up to a week.