If I buy a tablet with Honeycomb 3.1, will I be able to upgrade it to 3.2? How about 4.0, 5.0, ...? I am in the market for a tablet. However I am not clear the degree to which the hardware will be linked to a specific android version. For example, if I get the Motorola Xoom or the Galaxy Tab 10.1, will I be able to upgrade it to honeycomb 3.2?

Will there be limitations on future upgrades, and if so, on what time scale?
There's really no way to answer this question. There are devices out there that got to version 1.6 and are at the end of the line. I have a DROID with Froyo (2.2) and don't expect to get any more OS updates. 

It all depends on the hardware and, most importantly, how much effort the manufacturers and/or carriers want to put in to update the device. If the past is any indication, the answer there is "not much". They seem much more interested in selling their new phones. While Google and the manufacturers recently met and said that there will be more of an effort to support and update devices for at least 18 months, we've not seen the results of that. While they occasionally backpedal on announcements of "no more updates" it hasn't been very frequent.

If past performance is any indication, I think you can expect a few point releases, and perhaps a full release (to version 4.0) but beyond that I don't think is going to happen.

This is, of course, speculation, and this is now a fairly long non-answer answer to an unanswerable question.