In a medium saucepan, combine vinegar, sugar, salt, mustard seed, thyme, celery seed, and red-pepper flakes, bay leaves, black peppercorns, and allspice. Bring to a boil. Add corn, bell peppers, and onions. Return to a boil, stirring occasionally. Cook just until color of corn brightens, 1 to 3 minutes.
Ladle into clean jars. Cover, and refrigerate until cold. Will keep, refrigerated, for up to 1 month.