What does "on a hiding to nothing" mean?

Solution 1:

As other answers have pointed out, it refers to a situation in which it's pointless to try because it's impossible to win: either you're going to get a hiding, that is, take a (metaphorical) beating on your hide, or else...nothing. There is nothing else. You're going to lose, and you're probably going to lose so badly that your opponent is going to gain nothing from beating you.

Solution 2:

If someone is on a hiding to nothing, it means they don't stand to gain anything from their endeavour: in a sporting context, it can be used to mean that they are bound to lose, or that they are so sure to win that the will gain nothing from it (for instance because the bookmakers' odds will be so poor - or simply because there is no prestige to be gained from beating a far inferior team). But its use is not restricted to sport: it can be used in any other context where the prospects are similar.

There is no strong association with any particular class or region, so far as I'm aware.

Solution 3:

And more specifically for the second part of OP's question:

but in what sense is the hide in hiding contributing the meaning of the idiom?

Here, "hiding" is a noun used as a colloquial near synonym for "a beating". According to the OED, it goes back to activities involved in tanning a hide, related to the verb hide2, "2. To beat the hide or skin of; to flog, thrash". For the noun, OED gives this example from 1822 (not the oldest) for the equation with "a thrashing":

Giving him a severe beating, or, what was called, a ‘hideing’.
Thomas Bewick, Select fables..., 118.

Its use in the phrase a hiding to nothing means to get no benefit from this painful activity, as described already in the accepted answer.

Solution 4:

To be faced with a situation which is pointless, as a successful outcome is impossible.

More information here