Preheat oven to 400 degrees. Grease and flour 8x8 or 7x11 baking dish.
Carmelize the onions in 1-2 tablespoons of oil. Do not allow to burn. Set aside.
Stir cornmeal and salt into 1 cup warm water. Add 1 cup boiling water and bring to a boil over medium heat stirring constantly. Lower temperature and continue stirring until the consistency of heavy batter.
Remove from heat and stir in 2/3 of the onions and 3/4 of the cheese. Mix well.
Pour into baking dish and smooth to level. Top with reserved onions and cheese. Drizzle remaining olive oil over top. Sprinkle with freshly grated black pepper and red pepper flakes.
Bake 40-45 minutes or until top is golden and sides have pulled away from dish.
Allow to sit for 10 minutes to set, then cut into servings.