Preheat the oven to 400 degrees. Line a large baking sheet with parchment paper or aluminum foil.
Cut the top and bottom of the spaghetti squash off. Stand the squash upright and cut the squash in half lengthwise.
Using a spoon, scrape out the seeds and discard. Drizzle the inside of the squash with olive oil and season with salt and pepper. Place squash cut-side down on the baking sheet.
Bake the squash for 40-60 minutes until the insides are golden and can be easily pierced with a fork. Once squash is done, leave the oven on for later use.
While the squash is cooking, heat one tablespoon of olive oil in a skillet over medium heat. Add chopped garlic and cook for about 30 seconds to 1 minute. Add greens and cook until they are wilted and then set aside.
When the squash is done baking, gently scrape the insides with a fork to make them spaghetti like. Divide the cooked greens and the grated Parmesan cheese between the two halves and stir them into the squash. Season with salt, pepper and red pepper flakes (if using) to taste.
Spread marinara sauce over the squash to your liking and top with mozzarella cheese.
Bake the squash for an additional 15-20 minutes or until the cheese on top is melted and golden brown. Garnish with fresh basil.