Heat the vegetable oil in a saucepan over medium heat and saute the onion 5 minutes, until tender. Mix in carrot and mushrooms and continue cooking 5 minutes. Stir in stock, lentils, kidney beans, peanuts, hazelnuts, soy sauce and lemon juice. Season with thyme, rosemary, cayenne pepper and mixed spice. Bring to a boil, reduce heat to low and simmer 10 minutes. Stir in oats, cover and simmer 20 minutes.
Preheat oven to 190 degrees C. Lightly grease a baking pan.
Stir the egg into the saucepan. Transfer the mixture to the prepared baking pan. Bake 30 minutes until firm.