Preheat oven to 400°F Coat an 8 x 8-inch baking dish or 6 individual ramekins with nonstick cooking spray.
Place the squash and onion in a large saucepan in enough water to cover them. Cook over medium-high heat, covered, until the squash are tender, about 15 minutes. Strain well and mash slightly with a potato masher or large fork.
Add the goat cheese and butter while still hot and stir until melted.
Mix in the cornmeal, eggs, milk, dill, sugar, salt, and pepper.
Pour into baking dish or individual ramekins
Bake for 40 minutes (35 minutes for the ramekins) or until golden brown on top.