Start by preheating your oven to 350°F (175°C) and lightly greasing a baking sheet.
Place the spaghetti squash halves cut-side down on the sheet and bake for about 30 minutes, until a knife slides in easily. Remove from the oven and let it cool just enough to handle comfortably.
While the squash cools, heat the oil in a skillet over medium heat. Add the chopped onion and cook until soft. Stir in the garlic and let it cook just until fragrant—about 2 to 3 minutes.
Add the chopped tomatoes to the skillet and cook until warmed through. Turn off the heat and set aside.
Once the squash is cool enough, use a large spoon to scrape out the stringy flesh and transfer it to a bowl. Add the onion-tomato mixture, feta cheese, olives, and fresh basil. Toss gently until everything is well combined.
Serve warm and enjoy.