Preheat the oven to 400°F. Arrange the bread slices on a large rimmed baking sheet and brush the tops with olive oil. Bake for 10 to 12 minutes, until lightly toasted.
Toss together the shallots and vinegar in a large bowl. Let marinate at room temperature for 10 minutes.
Meanwhile, place a grill pan over medium-high heat. Grill the corn for 10 to 12 minutes, turning occasionally, until charred on all sides. Set aside until cool enough to handle. Cut the corn kernels off the cob and add to the bowl with the pickled shallots. Stir in the tomatoes, basil, and garlic and season with salt and pepper, to taste.
Spoon the corn mixture over the toasted bread slices and serve.