I guess I'll divide this into two parts.
As for careers and all, I think the key thing is to make the existential leap of faith that things will be okay when you get back. If you have saved money and have marketable job skills, you will be fine. I got a leave of absence for the PCT. But for the CDT, I had to quit outright and I had nothing to come back to. I didn't let this worry me on the trail. In fact, I hardly ever thought about it. And thanks to a couple of connections, I got a short-term project within a week of getting off the trail and a full-time job shortly afterwards.
The key thing, though, is DO NOT BE WORRYING ABOUT YOUR HOME-LIFE STUFF ON THE TRAIL! The last thing you want when you're trying to enjoy your thru-hike is to have creeping worries about finances or jobs or homes or whatever infringing on your experience. This is your chance to live in the moment for 5 months. Get your ducks lined up as best you can before you go and then put them out of mind.
As for on the trail stuff, I think other comments here nailed it. Be prepared for sucky hiking. There is no place on earth where you can walk 2000+ miles and have every minute be amazing. Every long-distance trail has shitty sections, and even the nicest sections can be ruined by bad weather, illness, injury, etc. You just have to deal with it.
One thing that always helps me on long hikes is to divide the trail into segments, each of which has something that you're really looking forward to at the end. On the PCT, my desire to get to the Sierras got me through some tough desert hiking in SoCal. Then, my next milepost was Crater Lake, which pulled me through NorCal. I was thinking about 3 Sisters and Goat Rocks while fighting the mosquitoes in Oregon. This strategy worked way better for me than thinking about getting to Canada, since that seemed impossibly far away until mid-Oregon or so.
Oh, and one more thing I wish I'd known: you're going to have some sorts of aches and pains almost every day. I don't think it's possible to walk 20+ miles a day without at least some foot pain. I remember in the first week of my first AT section, I was hiking with some thru-hikers (800 miles into their hikes). At the end of the day, we were going down a long, steep, rocky hill that was killing my feet, and I asked one guy how long it took for his feet to toughen up and stop hurting. Without missing a beat, he said, "they never stop hurting." He was right.
Good luck.