Preheat oven to 350°. Heat oil in a large heavy ovenproof pot over medium. Cook garlic, stirring often, until golden, about 4 minutes. Add onion, anchovies (if using), and red pepper flakes and cook, stirring often, until onion is translucent, about 5 minutes. Stir in tomato paste and cook, stirring often, until slightly darkened, about 2 minutes. Add wine, bring to a boil, and cook until almost completely evaporated, about 1 minute. Add tomatoes, breaking up with your hands, and their juices; add basil and oregano and stir to combine. Swirl 1½ cups water into one tomato can, then the other, to rinse, and add to pot; season with salt. Transfer pot to oven; roast sauce, stirring halfway through, until thick and tomatoes are browned on top and around edges of pot, 2–2½ hours.
Let sauce cool slightly. Pass through the large holes of a food mill or process in a food processor until mostly smooth. Taste and season with salt.
Do Ahead: Sauce can be made 2 days ahead. Cover and chill.
Lightly season eggplant slices all over with salt; place in a single layer on several layers of paper towels inside a rimmed baking sheet. Top with another layer of paper towels and more slices; repeat as needed. Top with a final layer of paper towels, then another rimmed baking sheet; weigh down with a heavy pot. Let eggplant sit until it has released excess liquid, 45–60 minutes. This step gives the eggplant a creamy texture when baked.
Meanwhile, pulse panko, oregano, pepper, and ¾ cup Parmesan in a food processor until very finely ground. Transfer to a shallow bowl.
Preheat oven to 350°. Place flour in another shallow bowl and eggs in a third shallow bowl. Working one at a time, dredge eggplant slices in flour, then dip in egg, allowing excess to drip off. Coat in breadcrumbs, packing all around, then shaking off excess. Place on wire racks.
Heat ⅔ cup oil in a large skillet, preferably cast iron, over medium-high. Cook as many eggplant slices as will comfortably fit in pan, turning once, until deep golden, about 5 minutes. Transfer to paper towels and immediately press with more paper towel to absorb oil. Working in batches, repeat with remaining slices, adding remaining ⅔ cup oil and wiping out skillet as needed. Let cool. Taste and season with more salt if needed.
Toss chopped herbs, low-moisture mozzarella, and remaining ¾ cup Parmesan in a medium bowl. Spread 1 cup sauce over the bottom of a 13×9″ baking pan; top with a layer of eggplant slices (trim as needed). Drizzle 1 cup sauce over and sprinkle with one-third of cheese mixture. Add another layer of eggplant, followed by 1 cup sauce and half of remaining cheese mixture. Repeat layers with remaining slices, sauce, and cheese mixture. Cover with foil and bake on a rimmed baking sheet until eggplant is custardy, 45–60 minutes.
Remove from oven and arrange fresh mozzarella over eggplant. Increase oven temperature to 425° and bake, uncovered, until cheese is bubbling and browned in spots, 15–20 minutes longer. Let rest 30 minutes. Top with basil leaves just before slicing.