How are altitudes handled with airports near or above transition altitude?
I don't have an authoritative source for what the various regulatory agencies in the various regions use for publishing their transition altitudes, but your assumption is pretty close: airspace is planned so that no airport is "that close" to the transition level.

Some TAs are defined across large swaths, such as the US, Canadian, Australian TAs.  Some TAs are more broken up, even within political boundaries.  I believe Brazil (or at least one of the South American countries) has different TAs for different "terminal areas".

There has been on-again/off-again discussions in the European region of establishing a common TA, but (as of this date) that has not happened.  You will see fairly low TAs in low, flat areas like The Netherlands, but higher TAs in the mountainous regions. 

Again, all of these TAs are "planned out" so that there is no danger of being too low while assigned to a flight level, and so that you are back on QNH well before you are on approach to an airport.