1. In a 4- to 5-quart pan over medium-high heat, stir onion in olive oil until limp, 3 to 5 minutes.
2. Stir in corn, milk, coconut milk, broth, and chili; bring to a simmer, reduce heat, and cook, stirring occasionally, until corn is tender to bite, 10 to 15 minutes.
3. With a slotted spoon, remove about 2 cups corn kernels from pan and reserve. In a blender or food processor, working in batches and holding down lid with a towel, whirl remaining corn mixture until smooth. Return to pan.
4. Add lime juice, basil, and reserved corn. Stir soup over medium heat until hot, 2 to 3 minutes. Add salt and pepper to taste. Ladle into bowls and garnish with lime wedges.
Cutting kernels: An average ear of corn weighs from 10 to 14 ounces and yields about 1 cup of kernels. To remove them, with a large, sharp knife, cut off and discard the stem end of each ear down to the beginning of the kernels. Pull off and discard the husks and silks; rinse ears. Holding each ear upright, shear off the kernels close to the cob.