Preheat a grill to medium. Brush the corn and bell peppers with 2 tablespoons olive oil. In a medium bowl, toss the shrimp with 1 tablespoon olive oil and season with salt and pepper. Arrange the corn, bell peppers and shrimp on the cooking grate and grill, turning occasionally, until the shrimp are opaque and lightly charred, about 5 minutes, and the corn and bell peppers are tender and lightly charred, about 12 minutes.
Once the bell peppers are cool enough to handle, peel and discard the skin. Using a food processor, puree the bell peppers, 1/2 cup mozzarella, 1/2 cup basil leaves and the lemon juice. With the machine on, gradually add the remaining 3 tablespoons olive oil; season with salt and pepper.
Spread the pesto on the cut side of the baguette halves, top with the grilled shrimp and sprinkle with the remaining 1 1/2 cups mozzarella and the thinly sliced basil. Arrange on the cooking grate, cover and grill until the cheese is melted, 3 to 5 minutes. Serve with the corn.