In a large pot of boiling salted water, cook the corn cobs for 3 minutes only. Drain and immerse them in ice water to stop the cooking and to set the color. When the corn is cool, cut the kernels off the cob, cutting close to the cob.
Toss the kernels in a large bowl with the red onions and basil. In a small bowl, whisk olive oil, vinegar, vinegar, salt, and pepper. Toss with the corn salad. Taste for seasonings and serve cold or at room temperature. If you are going to make the corn salad a few hours ahead, leave out the basil and toss it in right before serving.