To make the roasted mushrooms: Heat the oven to 425 degrees F.
Measure the oil into a small bowl and add the garlic clove. Let the oil sit for about 1 hour or until it is nicely infused with the flavor of the garlic. Remove the garlic and discard or save it for another use.
Cut the mushrooms into big pieces or thick slices. Combine all of the mushrooms in a large bowl and drizzle with the garlic-infused oil. Toss them well to coat them with the oil. Season with salt and a generous grinding of pepper, and sprinkle the parsley over them, if using. Toss again.
Spread the mushrooms out in one layer on a large rimmed baking sheet. Roast the mushrooms for 15 minutes, then toss with a spatula. Roast them for 10 minutes more, or until they are tender and browned, and the ones around the edges of the pan are lightly crisped.
Remove the mushrooms from the oven and scrape them into a bowl. Serve immediately or reserve for another use. Store the mushrooms in a container with a tight-fitting lid and refrigerate for up to 5 days or freeze for up to 3 months.
Heat the oven to 425 degrees F. Lightly coat a 9-by-13-inch baking dish with olive oil.
Combine the zucchini, eggplant, onion, and garlic in a large roasting pan. Pour 2 tablespoons olive oil over the vegetables and toss to coat them thoroughly. Season with 1 teaspoon salt and a generous grinding of pepper. Roast the vegetables, stirring them every 15 minutes, for 45 minutes, or until they are tender and nicely browned in spots. Scrape the vegetables into a large mixing bowl.
Reduce the oven temperature to 400 degrees F.
While the vegetables are roasting, bring a large pot of water to a boil over high heat and salt generously. Add the pasta, stir to separate, and cook according to manufacturer’s instructions until not quite al dente (it should be slightly underdone, because it will finish cooking in the oven). Drain the pasta in a colander, reserving about 1 cup of the cooking water.
Put the tomatoes in a medium bowl and mix in the lemon juice, 1/2 teaspoon salt, and 1 tablespoon olive oil.
Transfer the pasta to the large bowl and toss with the roasted vegetables and the roasted mushrooms. Add 2 cups of the tomato-lemon mixture and gently toss to combine thoroughly. Add a splash or two of pasta cooking water if needed to loosen up the sauce.
Spoon half of the pasta mixture into the prepared baking dish. Spread half of the sliced scamorza over the pasta. Spoon the remaining pasta on top, and cover with the remaining scamorza. Spoon the remaining tomatoes over the scamorza. Sprinkle the Parmigiano on top.
Cover the dish with foil (you may want to grease the foil as it will inevitably stick to the melting cheese) and bake for 20 minutes; uncover and bake 20 minutes more, until the cheese is melted and bubbly and the top is nicely browned and crisp around the edges. Let stand for 5 minutes before serving.