> And why is one of the world's biggest oil producers a
> lower-middle-income country?
Because the oil business just isn't that big? The largest sector of Iran's GDP is services, not oil. GDP per-capita in Iran is just over $8000 (compared to, say, $42k in the US). They also run huge deficits (percentage-wise, not actual dollar-wise). What's surprising is that you're surprised by this :-)
Iran is a 70M person country based on the economic model presented by the Houston area in the 1970s[*] :-)
/jordan
[*] "PLEASE GOD, Just Give Me One More Oil Boom. I Promise
Not to Blow It Next Time."
http://www.energybulletin.net/8819.html