What factors influence the items that are available in the Tavern Item shop? I've read that after completing certain levels on the harder difficulty levels the tavern shop seems to have better items, but does anyone have more detailed information about what specific factors are used to determine item quality?
As you mentioned completing harder challenges will refresh the shop with better rewards. The best coming from Insane Uber Monster Fest and Insane Spooktacular/Glitterhelm becoming the next best set of gear.
As far as specific factors, the only one I know of for sure is that the weapons will be reflective of the character that you completed the most recent map on. For example if you completed the challenge as a huntress/ranger you would only get bows, guns, grenade launchers, etc.
Pets are random as are the armours.