Start by caramelizing the onions. In a large soup pot, heat the olive oil on medium high.
Add the sliced onions and a pinch of salt and pepper.
Sauté for about 10 minutes, then reduce heat to medium low and press the onions down into pot. Let sauté without touching for 5 to 7 minutes. Toss and press the onions back down into the pot and leave for another 5 to 7 minutes.
Once the onions start to brown, pour the agave over the onions and toss to coat the onions.
Continue sautéing, pressing the onions down and leaving them for a few minutes at a time, repeating the process until the onions are fully caramelized. Golden brown and very tender. This may take about 35 to 45 minutes.
While the onions caramelize, start prepping the potatoes. Add the peeled and diced potatoes to a large pot of water. Heat the water on medium high. Bring to a simmer. Simmer the potatoes until they are fork tender and very easy to mash. About 15 minutes.
Drain the potatoes when they are done. return them to the pot and then pour in the vegan butter, vegan cream or non-dairy milk and a few pinches of salt and pepper.
Smash the potatoes with a potato masher and mix until smooth. Taste and adjust seasonings.
Once the onions are caramelized, remove half of them from the pot and add them to the mashed potatoes as well as the vegan Parmesan. Stir to combine. Set aside.
Now, to the pot with the remaining half of the onions, add the garlic, carrots and leeks. Toss to combine and sauté for 1 to 2 minutes.
Add the cooked lentils, the white wine and a pinch of salt and pepper.
Stir to combine and let simmer until the wine has been absorbed. About 2 to 3 minutes.
Add the flour and toss to coat everything in the flour.
Add the soy sauce, vegetable broth and sprigs of thyme. Stir to combine.
Let simmer for about 10 minutes or until the filling has thickened.
Preheat the oven to 400 degrees(F), while the filling simmers.
Add the corn and peas to the filling and stir to combine.
Let simmer for 2 to 3 more minutes, taste and adjust seasonings adding more salt and pepper if needed.
Pour the filling into a 8 x 8 or 9 x 9 inch baking dish and smooth out evenly. Put the mashed potatoes on top and spread out evenly. Top with a bit more vegan Parmesan and then bake for 15 to 20 minutes.
I like to put my baking dish on a sheet pan in case of overflow.
Let cool for a few minutes and then serve!