For the Thai peanut sauce: Whisk together the coconut milk, peanut butter, lime juice, soy sauce, maple syrup, garlic and red pepper flakes, if using, until the texture is creamy and smooth. (You can also use a blender or food processor to make the sauce.)
For the squash bowls: Preheat the oven to 425 degrees F. Brush the spaghetti squash with 2 teaspoons olive oil, then sprinkle with salt and pepper. Put the squash cut-side down on a baking sheet and bake until the squash is tender, 50 minutes to 1 hour.
Thirty minutes before the squash is done, toss the broccoli florets with 2 teaspoons olive oil and a pinch of salt and pepper. Spread out in a single layer on a baking sheet and roast until very tender, 20 minutes. Transfer to a bowl and toss with 2 tablespoons of the peanut sauce.
Meanwhile, whisk together the coconut milk, ginger, lime juice, soy sauce, maple syrup, cumin, turmeric, cayenne and shallot in a bowl. Add the shrimp and toss to combine. Let sit for 5 minutes.
Heat the remaining 2 teaspoons olive oil in a large skillet over medium heat. Add the shrimp and cook until seared and just pink on each side, 2 to 3 minutes.
Run a fork over the squash flesh to create spaghetti-like strands. Put in a large bowl and toss with 2 tablespoons of the peanut sauce.
Divide the spaghetti squash, broccoli and shrimp among 4 bowls. Drizzle with the remaining peanut sauce and garnish with cilantro and crushed peanuts.