Preheat oven to 450 degrees F. Bring a large pot of salted water to a boil.
Heat 2 tablespoons of the oil in a medium saucepan over medium heat. Add the garlic and red pepper flakes and cook, stirring, until the garlic is golden, about 2 minutes. Add both cans of the tomatoes, the oregano and 1 cup of water. Increase the heat to medium-high and bring to a simmer. Reduce the heat slightly and simmer rapidly, uncovered, until thick, 15 to 20 minutes. Stir in the ricotta and season with salt and pepper.
While the sauce simmers, heat the remaining 3 tablespoons oil in a large non-stick skillet over medium high heat. Add the eggplant and 1/2 teaspoon salt and cook, stirring occasionally, until golden brown and tender, 6 to 8 minutes. Transfer to a large bowl with a slotted spoon. Add the mushrooms to the skillet and cook, stirring occasionally, until golden brown, about 6 minutes; transfer to the bowl with eggplant.
Cook the shells in the water until very al dente, about 2 minutes less than the package directions. Drain the pasta and add it to the bowl with the eggplant and mushrooms.
Add the tomato sauce, salami, half the Asiago and half of the Parmesan to the bowl and stir well to combine. Transfer the pasta to a 3- to 4-quart baking dish and top with the remaining Asiago and Parmesan. Bake, uncovered, until browned, about 15 minutes. Let the pasta rest for about 10 minutes before serving.
Copyright 2016 Television Food Network, G.P. All rights reserved.