Essentially it's handled in the same way that you have Batman in the Justice League. Batman's power is unlimited wealth.
No, Batman's power is his preparedness. In M&M terms, Batman with absolutely no gadgets or wealth loses very little in Power Level (the measure of capability in M&M).
For some reason, the guys that can stand toe to toe with Superman just never take the time to squash Bats like a bug.
To be fair, Darkseid recently killed Batman. (He got better, but it took a long time.) In general, villains on the level of Superman don't bother with Batman, either because Batman-as-a-solo keeps himself busy with less cosmically powerful foes and plots or because when Batman is with the League, well, the BBEGs are (understandably so) occupied with the big hitters like Superman, Green Lantern, and Martian Manhunter. (BTW, I don't read DC team books, so those names are likely out of date for the current roster. Just examples.)
The advantages of having a writer protecting you.
This is true, of course, but good writers -- as opposed to hack writers -- work pretty hard at, and do a decent job, explaining things like "How in the world can Superman and Batman be considered peers? By anybody?"
One of my favorite examples of this was a story in which Superman "offered" to clean up Gotham, since Batman seemed to be incapable of doing so. The resulting chaos -- which of course Batman anticipated -- was far worse than the Sysiphean status quo Batman maintained, and Superman had to
mea culpa. Another example was in the excellent "Hush" arc, when Poison Ivy controlled Superman, and Batman only survived (barely) and broke her hold over him because he had been thinking twenty possibilities ahead.