Soak lentils in cold water overnight or for a couple of hours (this step is not mandatory).
Drain lentils and cook in vegetable broth with bay leaf until tender.
Immerse quinoa under boiling water for about 3 minutes, before draining and cooking it in water with a pinch of salt, until fluffy.
Sauté onion, garlic, and ginger in olive oil with a rosemary sprig. Add cumin, paprika, thyme, and black pepper, allowing the aromatics to release.
Deglaze with soy sauce.
Add mushrooms and cook until they're soft before adding the grated carrot and chopped celery and also letting them cook until soft.
Stir in nutritional yeast, incorporating it into the mixture, allowing its nutty flavor to permeate.
Fold in the cooked lentils, quinoa, and season with salt to taste.
Combine the oats with the mixture and then use an immersion blender to roughly blend half of the mixture until smooth.
Fold in the chopped walnuts, mixing it all together.
Transfer the mixture into a loaf pan and bake it in the oven at 180º C (350ºF) until it turns a golden brown (about 50 minutes).