Contracts can only stipulate things that are legal. If a term is illegal it is considered void. Courts tend to look unfavourably at unfair terms in one-way contracts which the other party had no opportunity to negotiate. I think that it is unlikely that a contract on the back of a ticket can override default legal treatment.
I would definitely hire an appropriate lawyer if I wanted to understand the legality of something like this in a given jurisdiction!