In my opinion, Putin did understand all this. I think he and senior military leadership believed that they would be in Kyiv in control of Ukraine in 24 to 72 hours.
They counted on special forces and special operations to get the job done fast. When that failed, they had to rely on conventional ground forces, and that's proving to be an expensive disaster for them.
Everybody talks about the nuclear threat, but the more realistic threat is that Russia would turn off Europe's gas. Russia absolutely cannot afford to do that. It would destroy their economy and would be a measure of the last resort – because of how interwoven global economies are.
I believe Russia is desperately searching for a face-saving way out of this crisis that they created. They saw Ukrainian nationalism and alignment with the West as an existential threat, and they took what they believed were measured actions to neutralize that threat.
Then it blew up in their face, and the economic realities you are writing about are presenting them with grave national consequences.
What happens next is anybody's guess, but in a rational world where everyone plays to their best interests, Russia is going to find a way out. Whether that means with Putin still in charge or sidelined is hard to say. But Russia cannot survive economically as a developed nation without bringing this conflict to an end.
In that respect, I think globalization is working.