Preheat the oven to 350°F (175°C). Spray a 12 x 12 inch (30 x 30 cm) baking dish with non-stick vegetable spray.
Prepare the spaghetti squash by splitting in half lengthwise, removing seeds and discarding. Use a fork to pierce the outer skin in several places. Place squash, cut side down, on a baking dish and pour in ½ cup (125 mL) water. Bake for 45 minutes or until tender when pierced with a fork and you can pull the flesh away into spaghetti-like strands. Alternately, follow the tips above and microwave on HIGH power for 15 minutes. Check for tenderness after 8 minutes. Turn and continue to microwave for 7 minutes or until tender.
Prepare the sauce while the squash is cooking. Heat oil over medium-high heat in a skillet. Sauté minced garlic and diced onion until softened, about 4 minutes.
Cut chicken into ½ inch (1.25 cm) cubes. Add to pan and sauté further until cooked through.
Stir in pasta sauce and freshly ground black pepper. Cover and bring to a boil, reduce heat to low and simmer for 15 minutes.
Mix shredded mozzarella and feta cheese. Slice the basil leaves and mince the rosemary. Mix with the two cheeses.
Spread half of spaghetti squash strands on the bottom of the baking dish. Top with half of the chicken & sauce followed by half the grated cheese and herbs. Repeat layers.
Bake uncovered for 30 minutes or until sauce is bubbling and cheese is lightly browned.