Preheat your oven to 375°F (190°C). Slice the eggplants lengthwise into ¼-inch thick slices. Lay them on a baking sheet, brush both sides with olive oil, and season with salt and pepper. Roast in the oven for 20-25 minutes, flipping halfway through, until the slices are tender and slightly golden.
In a large skillet, heat olive oil over medium heat. Add the chopped onion and sauté until translucent, about 5 minutes. Stir in the minced garlic and cook for another minute until fragrant. Add the crushed tomatoes, tomato paste, oregano, basil, red pepper flakes, salt, and pepper. Simmer the sauce for 20 minutes.
Drain and rinse the soaked cashews. In a food processor, combine the cashews, nutritional yeast, almond milk, lemon juice, garlic, salt, and pepper. Blend until smooth and creamy.
In a large baking dish, spread a thin layer of tomato sauce on the bottom. Arrange a layer of roasted eggplant slices over the sauce. Spread a portion of vegan ricotta over the eggplant, followed by a layer of chopped spinach. Sprinkle a handful of vegan mozzarella cheese on top. Repeat the layers, finishing with a layer of eggplant, tomato sauce, and a generous sprinkle of vegan mozzarella.
Cover the baking dish with aluminum foil and bake in the preheated oven for 25 minutes. Remove the foil and bake for an additional 15 minutes, or until the cheese is melted and bubbly.
Let the lasagna cool for about 10 minutes before slicing. Garnish with fresh basil leaves and serve warm.
