Preheat the oven to 200 degrees C (392 degrees F).
For the Topping:
Place the potatoes into a large pan of cold salted water over a medium heat. Bring to the boil and simmer for 15 minutes, or until tender. Drain and leave to steam dry then return to the pan with the butter, salt and nutmeg. Mash until smooth, adjust the seasoning as needed and set aside.
For the Filling:
Rinse and cook the lentils according to package instructions. Set aside.
Add the cornstarch to 120 ml (1/2 cup) of vegetable stock, whisk throughly and set aside.
Heat the olive oil in a large saucepan, add the onion, celery, carrot, mushrooms, 1/2 teaspoon of salt and saute' for about 7 minutes, stirring occasionally.
Add the soy sauce, tomato paste, thyme, rosemary, pepper, the remaining vegetable stock and lentils. Bring to a simmer, then add the cornstarch/stock mixture and simmer, whisking gently, until it thickens, for about 5 minutes.
Taste and adjust the seasoning as needed.
Put the lentil mixture into a 29x18 cm (11x7 inches) casserole and spoon the potatoes on top and fluff them up with a fork to create ridges, or use a piping bag with a star tip.
Bake for 25/30 minutes or until golden. Let the vegan shepherd's pie rest for 10 minutes, garnish with extra chopped rosemary and thyme, if desired, and serve.