Preheat oven to 350°F. Lightly oil an 8x8 inch baking pan.
Heat oil in a large saucepan over medium heat. Add onions, garlic, and cumin, and cook, stirring, until fragrant, about 2 to 3 minutes.
Add polenta, corn kernels, and oregano. Cook, stirring continuously, until polenta begins to stick to bottom of the pan, 3 to 5 minutes.
Add water and bring to a boil, stirring continuously. Continue to cook, stirring until polenta thickens, about 15 to 20 minutes.
Scrape polenta into prepared baking pan, top with chilies and grated cheese. Cover pan with parchment and seal with foil.
Bake until bubbling all the way through, about 45 to 60 minutes.