Preheat your oven to 375°F (190°C) and grease a loaf pan.
Cook the lentils according to package instructions and set aside.
In a large skillet, heat olive oil over medium heat. Sauté onions and garlic until softened.
Add mushrooms to the skillet and cook until they release their moisture, about 5 minutes.
In a large mixing bowl, combine cooked lentils, sautéed vegetables, breadcrumbs, flaxseed, ketchup, soy sauce, thyme, paprika, salt, and pepper.
Mix well and transfer the mixture into the prepared loaf pan. Press firmly to pack it in evenly.
Bake for 35-40 minutes, or until the loaf is firm and browned on top.
Let cool slightly before slicing and serving.