Mix red bell pepper, onion, and garlic in a large mixing bowl; season with basil, rosemary, salt, and pepper. Drizzle half the olive oil and the balsamic vinegar over the pepper mixture; toss to coat the vegetables evenly.
Brush eggplant slices with remaining olive oil to coat thinly.
Spread about 1/3 of the pepper mixture into the bottom of a square glass baking dish; sprinkle with 1/4 of the mozzarella; top with a layer of about 1/3 of the eggplant. Repeat layering twice more. Sprinkle remaining mozzarella cheese on top layer.
Bake until the cheese is browned and the vegetables are bubbling, about 40 minutes.