Heat oil in a large pan or pot, and sauté onions on medium-high heat until translucent, for 3 to 5 minutes. Add garlic and sauté for 1 minute more.
Add celery, squash, and spices. Sauté for 3 minutes, stirring often. Add orzo and rice; brown for 1 minute.
Pour in chicken broth and toss in cranberries. Return to simmer, then cover and reduce heat to low.
Continue to cook on low heat for 25 to 30 minutes, or until all liquid is absorbed. Remove from heat, fluff with a fork and season to taste with salt and pepper. Top with toasted chopped pecans if desired.