On the issue of the Dwarven Kingdom, the point about choice of law is further complicated by the fact that Thorin, a party to the Contract, is the de jure ruler of Erebor (or 'King Under the Mountain'), and, depending on the Folk of Durin's constituional/legal tradition, could be considered a (even the only) judge - or else might issue royal decrees to overturn a ruling.
As the Shire lacks an effective government, and particularly lacks awareness of matters outside its borders, Bilbo could easily be strung up under a foreign legal system if he crossed Thorin.