Heat the oven to 350°F. Cut the squash in half lengthwise with a sharp knife. Scrape out the seeds and seed flesh with a spoon and discard. Pour 1/2 cup water into a 9 x 13-inch baking dish and place the squash cut side down in the water. Roast for 45 minutes or until tender.
In a skillet, cook the bacon over medium heat until the edges crisp. Add the onions and cook for 5 to 6 minutes or until soft and beginning to brown. Remove from the heat.
In a large bowl whisk the eggs, then whisk in the ricotta. Fold in the cooked bacon and onions, then 1 cup of grated cheese and the salt and pepper.
When the squash can be easily pierced with a fork, remove it from the oven and turn the heat up to 375°F. Remove the squash from the baking dish and let it cool slightly. Dump out any water left in the baking dish, wipe it dry and then grease it lightly with cooking spray.
Shred the inside of the squash with a fork into spaghetti-like strings and remove from the outer shell. You should have approximately 6 cups. Mix the squash strings into the egg and onion mixture. Spread in the baking dish and top with the remaining 1/4 cup of cheese.
Bake for 45 minutes or until firm and golden on top.
Source : allrecipes.com