Preheat your oven to 400°F (200°C) and line two baking sheets with parchment paper.
Slice the two medium eggplants into ¼-inch rounds and sprinkle generously with salt. Let sit on paper towels for 15 minutes.
Pat the eggplant slices dry and arrange them on the baking sheets. Drizzle lightly with olive oil and season with black pepper. Roast for 20-25 minutes.
Heat 1 tablespoon of olive oil in a skillet and sauté chopped onion for about 5 minutes. Stir in minced garlic and cook for another minute.
Add the sliced mushrooms and cook for 8-10 minutes until browned. Season with dried oregano, dried basil, salt, and pepper.
In a medium bowl, combine ricotta cheese, egg, and grated Parmesan cheese if using. Stir in chopped parsley until creamy.
Reduce oven temperature to 375°F (190°C) and spread a thin layer of marinara sauce on the bottom of a 9x13-inch baking dish.
Layer roasted eggplant over the marinara sauce, then half of the ricotta mixture, followed by half of the mushroom filling. Add marinara sauce and sprinkle with mozzarella cheese.
Repeat layering with remaining ingredients and finish with marinara sauce and mozzarella cheese on top.
Cover with foil and bake for 30 minutes. Remove foil and bake for an additional 10-15 minutes until cheese is bubbly and golden.
Let the lasagna rest for 10 minutes before slicing. Garnish with fresh basil, if desired.
Notes
Ensure to sweat the eggplant to avoid a soggy lasagna. Adjust spices and herbs to your preference.