1 medium spaghetti squash (2–2 1/2 pounds), halved lengthwise, seeded
1 1/2 teaspoons kosher salt, divided
1 medium red onion, peeled, quartered
2 teaspoons ground turmeric
1 1/2 teaspoons ground allspice, divided
1/4 teaspoon cayenne pepper, divided
4 chicken legs (thigh and drumstick)
4 tablespoons olive oil, divided
2 tablespoons fresh lemon juice
1 tablespoon pomegranate molasses (see cooks’ note)
1/2 cup roasted salted pistachios, coarsely chopped
1/3 cup pomegranate seeds
1/4 cup coarsely chopped dill, plus more for serving
1/4 cup coarsely chopped mint, plus more for serving
Preheat oven to 375°F. Line a rimmed baking sheet with parchment paper.
Sprinkle each half of squash with 1/4 tsp. salt, then place facedown on prepared baking sheet along with onion quarters.
Combine turmeric, 1/2 tsp. salt, 1 tsp. allspice, and 1/8 tsp. cayenne in a large bowl. Add chicken and toss to coat. Arrange chicken skin side up alongside squash and onions on baking sheet. Brush tops of chicken with 1 Tbsp. olive oil. Bake until interior of squash and onions are fork-tender, chicken skin is crispy, and an instant read thermometer inserted into the thickest part of the chicken registers 165°F, 35–45 minutes; if chicken is done before squash, remove from oven and let rest until squash is finished cooking.
Meanwhile, whisk lemon juice, pomegranate molasses, and remaining 3 Tbsp. oil, 1/2 tsp. salt, 1/2 tsp. allspice, and 1/8 tsp. cayenne in a large bowl.
Finely chop onion quarters and transfer to bowl with dressing. Using a fork, scrape squash crosswise to pull strands from shells into bowl with dressing; discard shells. Add pistachios, pomegranate seeds, dill, and mint and toss to coat.
Divide chicken among plates, top with dill and mint, and serve alongside squash mixture.
Pomegranate molasses is available at Middle Eastern grocery stores and specialty food stores. You can substitute 2 teaspoons red wine vinegar and 1 teaspoon of honey for the 1 tablespoon of pomegranate molasses in the dressing.
If the squash is difficult to cut, poke it all over with a paring knife and microwave on high for 5 minutes before cutting.