Preheat the oven to 180°C fan/200°C/400°F/Gas 6.
Peel the potatoes and cut them into 5-mm/¼-inch thick slices. Cut the aubergines and courgettes into 1-cm ½-inch thick slices.
Line a tray with paper towels. Heat a splash of oil in a large frying pan set over a medium heat. Add the potato, aubergine and courgette slices in batches and fry/sauté until golden and just cooked through, then transfer to the paper towel-lined tray to drain. Arrange a layer of potato slices in the baking dish, and season with a pinch of oregano and a few grinds of black pepper. Repeat with a layer of aubergine and finally courgette, again adding oregano and seasoning between each layer.
To make the ragù, add a little oil to a medium saucepan and set over a high heat. Add the mushrooms and fry/sauté for about 15 minutes, stirring occasionally; you want these deeply caramel coloured. Turn down the heat and add the onion and cook through for another 5 minutes until it has softened and coloured. Add the garlic and cook for 1 minute, then add the lentils, tomato purée, parsley, cinnamon, nutmeg, oregano and sugar. Add about 60 ml of water and simmer, uncovered, for 10–15 minutes until the ragù is rich and thick. Spoon this over the layered vegetables, levelling the surface with the back of the spoon.
To make the béchamel sauce, melt the butter in a saucepan set over a low-medium heat. Add the flour and stir continuously until a paste forms and cook this for 2 minutes. Add the milk to the pan gradually, whisking as you go, until the sauce has thickened and is smooth. Season generously with salt and pepper.
Gently pour the sauce over the ragù layer, again smoothing out the surface with the back of a spoon. Scatter the grated cheese over the top and cook into the preheated oven for 30 minutes. Leave to rest for 15 minutes before serving with a simply dressed green salad.