HEAT the oven to 375 degrees. Spray a cookie sheet with nonstick cooking spray. Cut the squash in half lengthwise, and scoop out and discard the seeds. Place the halves cut side down on the cookie sheet. Bake until a fork easily pierces the skin, about 30 minutes. Let the squash cool until you can handle it, then scoop out the inside of the squash into a large bowl. It will come out in crunchy strings. Discard the skin.
STIR the onion mixture into the spaghetti squash. Stir in the cottage or ricotta cheese and the bread crumbs. Spray a 2-quart casserole dish with nonstick cooking spray, then pour in the mixture. Top with the Parmesan. Bake uncovered for about 30 minutes, or until the casserole is bubbling and the top is lightly brown.