Fold a 36x18-inch piece of heavy foil in half to make an 18-inch square. Place onions in center of foil. Sprinkle with salt and pepper. Drizzle with balsamic vinegar. Bring up two opposite edges of foil; seal with a double fold. Fold remaining edges to completely enclose onions, leaving space for steam to build.
Grill packet, uncovered, over medium heat 25 to 30 minutes or until onions are tender, turning packet occasionally. Carefully open packets to allow steam to escape. Sprinkle onions with thyme.