Preheat and Prepare: Preheat your oven to 375°F (190°C). Line a baking sheet or loaf pan with parchment paper.
Make the Flax Egg: In a small bowl, combine the ground flax or chia and water. Stir and set aside to thicken.
Cook the Aromatics: Heat the olive oil (or water/broth for oil-free) in a skillet over medium-high heat. Add the mushrooms, onion, and garlic. Sauté until softened and just beginning to brown, about 5 minutes. Remove from heat and set aside.
Mash the lentils: In a large bowl, mash about 3/4 of the lentils with a fork or potato masher, leaving the rest whole for texture.
Combine the Ingredients: To the bowl with the lentils, add the cooked mushroom mixture (including any juices), the prepared flax egg, tomato paste, soy sauce, smoked paprika, Italian seasoning, salt, and pepper. Mix well. Stir in the breadcrumbs and walnuts then mix again. Add plant-based milk 1 tablespoon at a time until your lentil meatloaf mixture is moist but not soggy and holds together well. I usually add all 4 tablespoons of plant-based milk, but you may need less depending on your breadcrumbs and how much moisture they absorb.
Shape and Bake: Transfer the mixture to the prepared baking sheet or loaf pan. Shape it into a loaf with your hands or press it evenly into the pan. Bake for 25 minutes, unglazed.
Prepare the Glaze: While the loaf is baking, mix the ketchup, brown sugar, apple cider vinegar, and garlic powder in a small bowl.
Glaze and Finish Baking: After the loaf has baked for 25 minutes, remove it from the oven and spread the glaze evenly over the top. Return to the oven and bake for an additional 15-20 minutes until the glaze is sticky and slightly caramelized around the edges.
Serve: Allow the loaf to rest for 10 minutes before slicing to ensure it holds together. Serve hot with your favorite sides.