Imperial Guardsmen actually are meant to represent pretty competant, trained reasonably well equipped troops. While they are often treated like cannon fodder by the Imperium and are often individually out matched by the xenos they fight compared to most PDF or militia troops they are pretty elite.
Added to this is the fact that manpower is not something the Imperium has in short supply.
With all this in mind it doesn't make a huge amount of sense for the Department Munitorium to continue to feed, water, transport, regulate, adminsiter and equip a regiment that is made up of geriatrics, suffering from chronic PTS or are simply physically worn out. Far more efficient to retire off the old regiment and raise a new one.
On this basis I think that Guardsmen do retire. I would suspect they probably have a long mandatory tour to complete 15+ years up and are encouraged to re-enlist. After they retire, receive backpay and what ever passes for a pension after which they are on their own. If they are lucky then they get to colonise a world. If they are unlucky they find themselves at a random space port a long way from anywhere.
There would be lots of caveats to this though.
First the type of regiment. Penal Legions obviously don't retire and I doubt many abhuman regiments do either (possible exception of Ratlings). Certain regiments like the Death Korp don't retire for historic reasons for example.
Second the types of enemies that Guardsmen fight and the sheer brutality of the Imperial tactics probably mean that most don't last long enough to retire and those that do are likely so institutionalised and desensitised to violence or are suffering from various battle traumas that they couldn't cope in the outside world.
Thirdly I suspect that simple issues such as pay, pension and cultural dissonance probably means that retirment for many guard probably makes retirement impractical and they just reenlist.
So if your from a feral world regiment your pay might be six chickens a day. On your home world that seemed like a great deal but 15 years later your back pay converted into thrones might not amount to a whole lot. Certainly not enough to get you back to your own planet.
And this is to say nothing of the fact that the day you retire your out . This means the administratum doesn't feed you, they don't tell you were you are, you don't have any briefings to tell you what to do. If your really unlucky you might be the only one i nthe regiment retiring that day. Do you even speak the language of the world you happen to be on?
In short I think Guardsmen do retire but it isn't necessarily as simple as that.
WH40k is a fictional setting and mundane aspects have not been worked out/depicted. Or depicted in many different ways.
So what we can do is take historical facts and try to match them to how the Imperium would operate....
Historically, armies have developed quite sophisticated retirement schemes for its soldiers. Often, they would be better/more advanced than any civil pension/retirement scheme. Not out the goodness of their hearts but because it was very good for morale and because having men trained to commit violence wandering about without any other means to support themselves was a bad idea™.
That's why the notion of retired soldiers being dumped by the regiment is a rather silly idea. What is more likely to happen? These men will stoically starve or turn to banditry/attack the uncaring regiment that dumped them there after years of faithfull service?
Regarding pay, I can't think of any army in history which didn't pay their soldiers. Perhaps not very much, but pay was necessary. The army can't provide every thing, soldiers have individual needs and luxury items such as alcohol and cigarettes must be paid for. Soldiers have often mutinied if not paid and one individual who mutinied for not being paid even demanded to be paid in full what he was owed before being executed for combat refusual.
The Imperium IMO is not stupid. It has rules and regulations for everything and in order to best organise and deploy its resources. So it stands to reason that it would have regulations for retirement & pay because that offers the best return on investment. If tales spread that guardsmen were treated horribly (beyond their actual lot) by the powers that be, the powers that be would have to invest a lot more effort in raising regiments.
Not to say that stupid things don't happen but that's mostly because regulations are followed dogmatically without thought or applied inappropriately.