Preheat oven to 375°.
Remove white papery skin from garlic head (do not peel or separate cloves). Wrap head in foil. Bake at 375° for 40 minutes, and cool 10 minutes. Separate cloves; squeeze to extract garlic pulp. Discard skins. Mash pulp.
Melt butter in a large nonstick skillet over medium heat. Add corn; cook 4 minutes, stirring occasionally. Remove 1 cup corn, and set aside. Add onions and thyme to remaining corn in pan; cook 1 minute, stirring frequently. Remove from heat; cool slightly.
Coat 6 (6-ounce) custard cups with cooking spray. Combine mashed roasted garlic, green onion mixture, milk, eggs, egg yolk, salt, and pepper, stirring with a whisk. Divide the egg mixture evenly among prepared custard cups. Place the custard cups in a 13 x 9-inch baking pan, and add hot water to pan to a depth of 1 inch.
Bake at 375° for 40 minutes or until a knife inserted in center of custard comes out clean. Remove cups from pan; cool 5 minutes on a wire rack. Loosen edges of custards with a knife or rubber spatula. Place a plate, upside down, on top of each cup; invert onto plates. Sprinkle reserved corn evenly around each custard. Garnish with thyme sprigs, if desired.