I would like to buy a USB switch and hub, or a combination hub/switch to connect several USB peripherals to two computers. According to this answer on a related question, many USB devices like this are cheaply designed and can feed power from host to host or from device to host. I would like to use a multimeter or similar device to ensure that my hubs and switches will not damage my devices. What is the best way to do this?
The test for backfeed is fairly simple. You need to make a dummy USB port with VBUS, D+ and D- loaded with 15 k resistors. When you plug your hub-switch combination into this "fake"/test port, voltages on any of the pins (VBUS, D+, D- ) should not exceed 400 mV. See the Back Voltage test description here. For schematics of the test fixture, see this answer, USB IF specification for back powering Hubs .
For general scope of USB 2.0 electrical tests for USB-IF compliance, see this document.