Cook the lentils and quinoa according to package instructions.
Finely chop the walnuts, mushrooms, onion, and garlic.
Sauté the onion, garlic, and mushrooms in a frying pan.
In a mixing bowl, combine the cooked lentils, sautéed vegetables, quinoa, breadcrumbs, walnuts, nutritional yeast, tomato paste, soy sauce, flaxseed, thyme, rosemary, sage, salt, and pepper.
Mix everything together until well combined.
Transfer the mixture into a greased loaf pan.
Bake the loaf in a preheated oven at 375°F (190°C) for 45-50 minutes.
Let the loaf cool in the pan before transferring it to a cooling rack.