Bruce doesn't appear in truly physical difficulty at the end of TDK yet in TDKR he looks in pretty rough shape.
^It's been a while since I watched TDK but yes, I'd also agree that I couldn't quite figure out how or when Bruce was supposed to have been so badly injured as to require the cane.
As far as his extensive injuries go, though, that can easily be explained by what he goes through in Begins and TDK alone. In the span of those two movies he:
- Falls through ice, gets beaten by sticks, gets his arm slashed by a Katana, gets in prison brawl, fights a bunch of ninjas, falls off a mountain before digging in and supporting two grown men with one arm, and carries Ras on his back down the mountain and walks to the nearest city.
- Falls several stories from the GCPD building and crashed into a metal fire escape without the cape to get away from a pursuing Gordon and gets set on fire and exposed to the fear toxin by Crane.
- Fights multiple League of Shadows ninjas, gets a burning wood beam dropped on his body, gets smoke inhalation, gets jumped by a mob in a riot, and gets dragged by the arm from a train.
- Fights several mob henchmen, gets bitten on the torso and arms/legs by rottweilers, gets thrown from a van into a concrete post, falls down three stories and crushes the van.
- Fights several of Lau's henchmen, and gets yanked out of a building by a plane while carrying Lau.
- Fights several of Joker's henchmen, gets kick/stabbed by a boot knife, falls from the penthouse of a skyscraper and crushes a car while taking the brunt of the impact to protect Rachel.
- The Tumbler gets blown up by an RPG with him in it and (aptly) tumbles multiple times, and he falls off the Batpod after being shot at.
- His Lamborghini gets smashed between a small penis substitute giant pickup and an SUV with Reese in it.
- He fights even more of Joker's henchmen, Joker kicks him while he's down and hits him with a metal pole, he gets chewed on by the same Rottweilers again, he fights a SWAT team.
- Gets shot by Harvey Dent and tackles him off a five story building onto steel beams and the ground.
He's got enough adrenaline at the time to shake it off and walk away, but all that crap is going to catch up with him. I'm amazed he can walk at all, much less with a cane, and that's just because he's the goddamn Batman.