Preheat your oven to 350°F (175°C). Lightly butter a 2-quart baking dish or 9x9-inch square pan.
If using fresh corn, carefully cut the kernels from the cob using a sharp knife. Stand the ear of corn upright in a wide bowl to catch all the kernels and corn milk.
Pulse 3 cups of corn in a food processor until coarsely chopped (about 7-8 pulses). Leave the remaining 2 cups whole for texture.
In a large bowl, whisk the eggs until frothy, about 30 seconds. Add the heavy cream and continue whisking until well combined.
In a separate small bowl, mix the sugar, flour, salt, pepper, and nutmeg.
Gradually add the dry ingredient mixture to the egg mixture, whisking constantly to prevent lumps.
Fold in the melted butter and all of the corn (processed and whole kernels). If using thyme or bell pepper, gently stir them in now.
Pour the mixture into your prepared baking dish. Place the dish in a larger pan and add hot water to create a water bath that comes halfway up the sides of your baking dish.
Bake for 45-50 minutes, or until the center is just set but still slightly jiggly.
Allow to rest for 5-10 minutes before serving warm.