Well, the pepper spray has the advantage of being portable, as well as purpose designed to ruin someone's day. Depending on the composition on the fire extinguisher (foam, bicarb, &c...) it's either inert or pointedly inert, and your only advantage of the extiguisher is surprise, volume of fire (so to speak), and the resultant opening to whang the target upside the head with it.
If I had nothing and were placed in a Jackie-Chan-eque situation I'd grab an extinguisher if I could. But given the choice here I'd take the pepper spray.
Given the choice not here I'd take a gun, a short polearm, or a large dog. But that's beside the point.