I believe Google Maps cycling and walking directions take this into account, but not driving directions, because typically cars and motorcycles have 0 issue with up and down grades; poorly maintained and narrow should be taken into account in Google Maps directions for cars, though.
I'm not 100% sure how much Google Maps Cycling directions try to avoid hills, but they DO list the elevation change in the sidebar, at least on a web browser, so they're aware of the concern over elevation change.