Line a loaf pan with parchment paper and set aside.
Chop garlic cloves, onion and carrot in very small pieces.
Sauté garlic and 1 tbsp olive oil in a large pan over medium heat until fragrant. Then add onion and carrot and sauté for 4-5 minutes or until onion is translucent.
Chop shallots and add it to the other vegetables. Cook for two more minutes.
Place the cooked vegetables in a big bowl and add 2 cups of the cooked lentils. Using a hand blender, puree the vegetable/lentil mixture until it forms a smooth paste. Then add walnuts and blend again. This can be done with a food processor as well.
Add all the spices, the rest of the lentils, breadcrumbs, the flaxseed egg, 1 tbsp olive oil, balsamic vinegar, soy sauce and salt and stir to combine.
Transfer the mixture to the prepared loaf pan, pressing with a spoon to get a compact loaf.
For the glaze, whisk all the ingredients together and spread it with a spoon over the top of the loaf.
Bake for 40 minutes at 350 degrees F, or until golden brown on the edges.