Cut the squash in half lengthwise and scoop out the seeds. Put the squash cut-side down in a microwave-safe dish with 1 cup water. Cover loosely with plastic wrap and microwave until tender, about 15 minutes. Uncover and let cool slightly. Use a fork to scrape out the flesh in strands; transfer to a bowl.
Meanwhile, heat the olive oil in a large skillet over medium-high heat. Add the pancetta and cook until crisp, about 4 minutes. Add the onion and cook until soft, about 3 minutes. Stir in the garlic, anchovies and red pepper flakes, smashing the anchovies into the oil; cook 30 seconds. Add the wine; bring to a boil and cook until reduced by half, 2 to 3 minutes. Add the tomatoes, crushing them into the skillet with your hands. Bring to a boil, then reduce the heat to medium low and stir in the olives, capers and basil. Simmer, stirring occasionally, until thickened, about 10 minutes.
Add the spaghetti squash to the sauce and toss to coat. Season with salt and pepper. Divide among shallow bowls and drizzle with olive oil. Top with basil and parmesan.