Preheat the oven to 350°F (175°C) and line a loaf pan with parchment paper, allowing some overhang for easy removal. You can also use a glass or silicon loaf pan.
Prepare the flax egg by mixing ground flaxseed with 3 tablespoons of water in a small bowl and let it sit for 5 minutes to thicken. Set aside.
Sauté the onion, garlic, carrot, celery, and mushrooms in a skillet over medium heat for 5-7 minutes or until softened, adding a splash of water if needed to prevent sticking. Stir in the fresh rosemary, thyme, parsley, tamari, and balsamic vinegar, and cook for another 2 minutes.
Combine (in a bowl or the same pot) the cooked lentils, chopped nuts, panko breadcrumbs, and the sautéed vegetable mixture. Mix well until everything is fully combined. Season with salt and pepper.
Scoop half of the mixture into a food processor and pulse until finely pureed. Return it to the bowl, add flax eggs, and mix with the rest. If it’s too wet, add more bread crumbs.
Prepare the filling (optional) by sautéing the chopped spinach in a pan over medium heat with a splash of water or vegetable broth for 1-2 minutes until wilted slightly. Remove from heat and combine with the sun-dried tomatoes, roasted red peppers, balsamic vinegar, salt, and pepper. Stir well.
Assemble the nut roast by pressing half of the nut roast mixture into the prepared loaf pan, creating a firm layer. Spread the filling mixture evenly over this base layer, then press the remaining nut roast mixture on top, pressing down gently to compact the layers.
Bake for 50-60 minutes or until firm and golden brown on top. Let it cool in the pan for 10 minutes before lifting it out using the parchment paper overhang. Slice and serve warm, garnished with fresh rosemary or thyme if desired.