All the factors you named, urban vs wild, duration in time, mileage, strenuousness, enter in to my own definition of a hike vs a walk, but I don't think it's possible to find objective criteria that would allow all of us to agree when walking becomes hiking. It's in the eye of the beholder.

But that's just how human languages tend to work. Ambiguity in such matters is normal and exactitude without resorting to mathematics is very hard to achieve.