Sprinkle the eggplant slices with salt and let them sit for 20 minutes to draw out moisture. Pat the slices dry with a towel.
Set up three shallow dishes with the flour in the first, beaten eggs in the second, and breadcrumbs in the third. Dredge each eggplant slice in flour, then egg, then breadcrumbs.
Heat the olive oil in a large skillet over medium heat. Fry the breaded slices in batches until golden on both sides, about 3 minutes per side. Drain on paper towels.
Spread a thin layer of marinara sauce in the bottom of a baking dish. Arrange half the eggplant slices over the sauce, top with more sauce, half the mozzarella, and half the Parmesan. Repeat the layers once more.
Bake at 375°F for 25 minutes until the cheese is bubbly and lightly browned.
While the eggplant bakes, cook the spaghetti in a large pot of salted boiling water until al dente. Drain and divide among four plates.
Place two or three eggplant slices on each portion of spaghetti and spoon extra marinara over the top. Garnish with fresh basil leaves before serving.