Heat the oven to 425°F and rub the cut sides of the squash with olive oil and 1/2 teaspoon salt.
Roast the squash cut-side down until the strands pull free but are not mushy, 35 to 40 minutes.
Scrape out the strands, spread them on a towel and press gently to remove excess moisture.
Reduce the oven to 375°F and mix the squash with the rotisserie chicken, pesto, ricotta, black pepper and remaining salt.
Spread the mixture in a 2 1/2-quart dish and top with mozzarella and Parmesan.
Bake until hot and browned at the edges, 18 to 22 minutes.