Heat a grill or grill pan to medium-high heat.
Cut the loaf of bread lengthwise from top to bottom into 6 center-cut oval slices, each about 1/4-inch thick. Spread 1 side of 3 slices with pesto. Layer the mozzarella on other 3 slices.
Put the eggplant, bell peppers, zucchini, and onion on a large rimmed baking sheet. Coat both sides with cooking spray and sprinkle with the salt, oregano, and pepper. Grill the eggplant, peppers, zucchini, and onion directly over heat until nicely marked by the grill and just tender, 3 to 5 minutes per side. Let cool slightly, then slice the vegetables if necessary to fit onto the bread.
Arrange the vegetables and sun-dried tomatoes over the cheese. Top with the pesto-spread slices of bread. Coat all over with cooking spray.
Grill the sandwiches over medium heat with a heavy weight, such as a cast-iron pan or foil-wrapped brick, on each sandwich to compress it. Or, if using a panini press, press down the lid. Cook until nicely marked by the grill and the cheese melts, 3 to 5 minutes per side. Cut each sandwich in half on the diagonal and serve hot.
Tip: Look for oil-packed sun-dried tomato strips in the Italian section of your grocery store or near the fresh tomatoes in the produce aisle.