Preheat the oven to 375 F and grease an 11x7-inch baking dish with cooking spray.
Melt the butter in a large skillet over medium heat. Add the corn and sauté for 3 minutes, or until the corn is soft. Let cool slightly.
In a large bowl, whisk together the milk, eggs, ricotta, cornmeal, sugar, salt, and half of the shredded cheddar. Stir in the sautéed corn and green onions.
Pour the mixture into the prepared baking dish. Top with the remaining cheddar.
Bake for 35 to 40 minutes, or until the center no longer jiggles when you gently shake the pan. Let cool for 5 minutes before serving.