Pour the oil in a medium skillet over medium heat. Add the onions and cook until translucent, stirring occasionally. Add the peppers and cook for 1 more minute. Remove from heat and cool to room temperature.
Preheaat the oven to 375 degrees. Grease a 9x9-inch pand that's at least 2 inces deep, or a shallow 2-quart casserole dish.
In a large bowl, combine the cornmeal and milk. Stir in the sugar, cottage cheese, eggs, salt, pepper and baking powder. Stir in the corn kernels and cooled onion mixture. Stir in the cheese and then transfer the batter to the prepared pan.
Bake for 40 to 45 minutes, until the center doesn't wobble when lightly touched with your finger. Remove from the oven, serve warm.