Remove the potatoes from the water, drain them well, transfer into bowl with pumpkin, add chopped herbs and garlic, salt, and olive oil. Mix well.
Prepare a square tin with baking paper and a drizzle of oil on the bottom to make it stick.
Heat the oven up to 190C.
Transfer the sliced and seasoned potatoes and pumpkin to the tin. Arrange them neatly, layer by layer. (Line the potatoes together, then the pumpkins together - repeat until all the ingredients in the bowl are finished).
Add vegetable stock to the tin, up until under the top layer. Put another sheet of baking paper above the top layer, add another square tin and any heavy kitchen tools that are safe to go to the oven to press the dauphinoise down.
After that's done, put the tin in the oven for 20-40 mins, check if its cooked with skewer.
Remove the heavy tools and baking paper from the top of the dauphinoise, brush the surface with melted butter to finish, place in the oven again for another 5-7 mins at 200c.
Remove from the oven when cooked and slightly golden.