Preheat the oven to 425 degrees F.
In a small pot, heat about 1/2 cup of the extra-virgin olive oil with the crushed garlic, rosemary sprigs, and red pepper flakes. Let the oil infuse over low heat for a couple minutes.
Meanwhile, arrange cooling racks over 2 rimmed baking sheets. Trim the tops and bottoms of the eggplants and thinly slice the eggplants and the tomatoes. Brush the eggplant with seasoned oil, using a pastry brush, and arrange the slices on 1 of the racks. Arrange the sliced tomatoes on the other rack and season both the eggplant and tomatoes with salt and pepper, to taste. Roast until the eggplant is tender and slightly shriveled up, about 15 minutes.
While the eggplant and tomatoes roast, add the basil, parsley, nuts, Parmigiano, and salt and pepper, to taste, in a food processor and pulse until finely chopped. With the processor running, stream in about 1/4 cup of extra-virgin olive oil to form a thick pesto. Arrange about 1/2 cup of arugula leaves on each sub roll bottom. Top with layered slices of roasted eggplant, mozzarella, and roasted tomatoes. Spread some pesto on the roll tops and set in place. Cut the subs in half and serve.