X-wing pilot suits had a personal life support system that utilizes a magnetic containment field (like the ones used in fighter bays) to keep a bubble of breathable air around the ejected pilot. I think pilots were supposed to be able to survive for 30minutes or something before they freeze to death or run out of air. In the beginning of the book "Truce at Bakura", Wedge Antilles goes spacewalking in his pilot suit in order to prevent a message drone from self-destructing and is saved by Luke just before he freezes to death. I don't think I ever figured out what the Rebellion/New Republic used as a rescue shuttle but the Lambda class shuttles could be fitted with a personnel tractor beam to pick up ejected pilots (but TIE fighter pilots couldn't eject?). Supposedly the intergalactic rules of war (like the Geneva Conventions) say that both sides are supposed to rescue ejected pilots regardless of alliance but I don't think the Empire did since they didn't consider the Rebellion a legitimate enemy.
As for Han's commission, part of it can be explained by his work for the Rebellion before episode 4 and in between episode 4 and 5, where he rescues people, finds treasures, etc but a lot of it is filling in the holes after the fact since the those books are newer.
Yes, the Star Wars universe is messy and there's a lot of contradictions. It's fiction, just sit back and enjoy the story.