To whatever extent the shortest route question is not in NP, it is also not NP-hard.
Both NP and NP-hard are defined for the class of decision problems.
Both NP and NP-hard are defined for the class of decision problems.
You may review the following to clarify the distinction between the various NP complexity classes:
https://en.wikipedia.org/wiki/NP-hardness#NP-naming_conventi...
>A decision problem H is NP-hard when for every problem L in NP, there is a polynomial-time many-one reduction from L to H