Cut the squash in half lengthwise, then into ¼-inch-thick slices.
Heat the oil in a dutch oven over medium heat. Add the onions and salt and pepper, and sauté until soft, 5 minutes. Add the rice and cook, stirring, for another 5 minutes.
Meanwhile, bring the stock to a boil in another saucepan. Reduce the heat and keep it at a simmer.