Peel and slice eggplant 1/4 inch thick. Place slices on a rack, sprinkle with salt, and let sit for about 20 minutes. Rinse off salt and pat dry. Brush with olive oil on both sides, place on pan and roast at 450 degrees for 25 minutes, flipping the eggplant 10-15 minutes in. Once done, reduce heat to 350 degrees.
While roasting eggplant, chop oregano and thyme, and mince garlic. Combine herbs and garlic with ricotta, cheeses, egg, and pepper.
Line a 9" square baking pan with foil. Coat bottom with 1/2 cup of sauce. Line pan with 1/2 the eggplant. Layer with 1/2 spinach, 1/2 ricotta mixture, then 1/2 remaining sauce. Repeat, ending with sauce. Top with slices of mozzarella.
Bake covered for about 30 minutes. Remove foil and bake for 5 to 10 minutes more until cheese is brown and bubbly.