Start by preheating the oven to 375 F.
Cut the squash in half, remove the seeds and place it in a baking dish. Pour about ¼ inch of water into the dish, cover with plastic wrap, and microwave for 8-10 minutes or until fully cooked. You might need to check it periodically to check for doneness.
Wait until it is cool enough to handle, and remove the flesh from the squash using a fork, creating spaghetti-like strands. Place these strands into a bowl.
Heat a skillet over medium-high heat and melt the butter. Saute the sliced onions in the melted butter until slightly brown (about 3-4 minutes).
Add the sauteed onions to the bowl with the squash, along with the red pepper flakes, garlic powder, sour cream, salt, pepper, and half of the shredded cheddar. Mix well and spoon into a greased 8-inch square baking dish.
Sprinkle the remaining half of the cheese evenly on top and bake for 20 mins.
After 20 minutes, broil for 2-5 minutes or until slightly brown on top.