Preheat a grill to medium (or preheat the oven to 350 degrees ). In a large skillet, melt the butter on the grill. Add the corn and onion and cook, stirring, until golden, about 4 minutes.
In a large bowl, whisk together the eggs, half-and-half, mustard, thyme, 1 teaspoon salt and 1/2 teaspoon pepper. Stir in the corn-onion mixture; reserve the skillet.
Place half of the bread in an even layer in the skillet. Pour in half of the creamy corn mixture. Sprinkle 1 cup cheddar on top. Repeat the layering with the remaining bread, creamy corn mixture and cheddar. Transfer to the grill, cover and bake until golden and the cheese is melted, about 25 minutes.