Preheat oven to 450 degrees F.
Trim the ends from the squash, and cut each squash in half lengthwise. Cut the halves in half again crosswise, to make 4 pieces; cut those pieces in half twice more the long way, to make 16 short spears from each squash. Toss the squash with olive oil and garlic in a bowl; place into a shallow baking dish. Sprinkle with salt and black pepper.
Roast the squash until the spears and garlic start to brown, 5 to 10 minutes. Check the squash after 5 minutes, and add time in 2- to 3-minute intervals to avoid burning.