Regardless of how the military side fares, both Russian and Ukrainian peoples are screwed.
Russian: the sanctions are destroying their economy, they're going to be struggling to find basic supplies and food. Lots of comments about the demographics, well, killing or severely injuring thousands of your young men is going to have a negative impact on potential population growth.
Ukraine: they've had millions flee the country due to the fighting. Russia is destroying housing, schools, hospitals, basic infrastructure. There's going to be no where for these people live, no health care, no education for their children. Many of the refugees who have fled will likely not return, because they functionally won't be able to. Why would a parent pull their children out of safe housing and schooling to return to a country where there's no bed, no school? You can't justify it.
There will be entire towns and cities just wiped off the map after this. When a town is pounded to rubble, it really doesn't make much sense to rebuild it from completely scratch. It's far too difficult to remove all the rubble, then build. Much easier to just go somewhere else and build. For major cities, sure. Small ones though? Unlikely. And that's before we talk about the overall economy.
The rebuilding of Ukraine is going to take decades. Russia as well, but they may face additional challenges in terms of the rest of the world shunning them.
It might not be as long as you think for the nation as a whole. I recalled Bernstein's graph for Germany and Japan after WW2:
from
http://www.efficientfrontier.com/ef/404/CH1.HTM[couldn't link image, see attachments]
Both nations had basically fully recovered after 20 years, but I bet Ukraine can do even better, provided they can stay together and shake off corruption. The biggest reason is poverty. Japan was probably the wealthiest country in Asia at the time, and Germany was a contender for wealthiest Europe. However, Ukraine was the second poorest, not even in the ballpark of wealthier European nations. With grants, loans, investments, and general business and tourism I bet they could economically recover to a much higher point very quickly.
Though I think that Russia will try to protract the war for as long as possible, because Ukraine will become integrated tightly with Europe the moment the war ends.
I think Russia will have a harder time recovering. Putin and his ilk neglected the nation and economy very badly for a very long time. I traveled through Russia in 2010 and most of it was very poor, and it seemed like there had been little investment in anything since Soviet times.