Roast chiles directly over fire of stove until skin is charred. Place in a bowl and cover with plastic wrap so that the chiles will sweat. Leave it to rest for 20 minutes.
Remove skin and chop the chiles.
Preheat oven to 350 F. Spray a loaf pan with non stick spray.
In a food processor, mix the eggs and butter until thoroughly combined.
Add 1 of the cans of corn and pulse around 15 times. You don’t want to process until smooth, just break down the corn a little bit.
Transfer to a large bowl. Add flour, baking powder, sugar and salt. Mix to combine.
Add remaining corn and chilies and mix until combined.
Place in prepared dish.
Bake for 45 – 50 minutes.