1. In a large pot of boiling salted water, cook pasta according to package instructions, then drain and return to pot.
2. Meanwhile, heat a grill or grill pan to high; clean and lightly oil. Toss tomatoes and corn with 2 tablespoons oil and season. Grill, turning occasionally, until charred in spots and tender, 6 to 8 minutes. Let cool slightly.
3. Chop tomatoes, cut kernels from cobs, and add to pasta. Stir in remaining 2 tablespoons oil and season. Serve warm or at room temperature. Top with ricotta and basil.