Boil the lentils and rice for 15-20 minutes in the vegetable stock, stirring occasionally. You'll need to stir constantly during the last 5 minutes or so, to ensure they don't stick to the bottom of the pan. Once they're cooked, don't drain the water, but instead continue stirring over the heat until enough water has boiled off for the mixture to resemble porridge.
Meanwhile, heat the oil in a frying pan, and add the chopped leek, pepper, mushrooms and courgette. Cook over a medium heat for 5-10 minutes, stirring occasionally, until the vegetables are soft.
Heat the oven to 190°C (Gas Mark 5 / 375°F).
Combine the cooked lentils and vegetables in a large mixing bowl, and add the paprika, cayenne pepper, and plenty of black pepper. Mix well.
Transfer half of the mixture to a baking dish, and sprinkle over half of the grated cheese. Add the remaining lentil mixture, smooth out the top, and finish with the remaining cheese.
Bake for around 25-30 minutes, until the cheese topping is golden brown and crispy.