If you have not already done so, bake the spaghetti squash using these directions. Allow it to cool to room temperature, and save one half of the squash for another recipe.
If the oven isn't already hot, preheat it to 350F and generously grease a 9-inch pie dish (I use this one) with coconut oil or butter. In the meantime, melt the coconut oil or butter in a skillet over medium heat and sauté the onion until tender, about 8 minutes. Add in the chopped kale, and sauté until bright green and tender, about 3 to 5 more minutes.
Transfer the sautéed veggies to a medium mixing bowl, and add in 4 eggs, 2 cups of cooled spaghetti squash strands, 1 ounce of shredded cheese, and season with salt and black pepper. Stir well and pour the mixture into the greased pie dish. Top with the remaining ounce of shredded cheese and bake at 350F until the top is golden, about 35 to 40 minutes. (The center will rise with baking, but will later deflate when you remove it from the oven.)
Allow to cool for 10 minutes and serve warm. Leftovers can be stored in a tightly sealed container in the fridge for up to one week.