Russia didn't sign up for a war. Russia signed up for an intimidation campaign of a president that had a low approval rating (people can google Zelensky+Panama+Papers if they like), and what they thought was a population/military that was as weak as it was in 2014. Putin also thought the Ukrainians wanted to be Russians. He thought they would kick out a weak president, and install a friendly government. There were some Crimeans who wanted to be Russians in 2014, but Putin thought everyone else felt the same. He was wrong. Very wrong.
What I did not know when this thing started was that after 2014, the Ukrainians got serious about their defense, and they were only worried about Russia invading. A lot of people came in gave them support defensively, but it was the most powerful and advanced military (USA) that was training them. This whole Territorial Defense Army, or whatever it's called? They didn't come up with that last week. That has been in motion since Crimea. Ukrainians didn't think Russia would actually invade till the last minute, almost no one did (except for US Intelligence really). But when it happened, Ukraine had a plan.
Can Ukraine win, military vs. military? No, I don't think so. But there are other variables at play. Like Russia's economy, and the fact that everyone and their cousin is lined up to pump as much aid as possible through Poland and Romania as they can. Plus, you know, Afghanistan. Except this time, Russia has a weaker army, and the Western world is arming the home team.
There are going to be some bad, bad days ahead for the Ukrainian people. Terrible.
But Russia cannot win this war firing stuff in from the border. Actual humans are going to have to drive those streets, and take cities, with every building having one guy with an RPG, and 20 people holding AK-47's and Molotov cocktails.