How do I even out a pair of bookcases on an uneven floor?
Attaching the bottom of both bookcases to a single flat board will get them aligned right.
Then you'll just have to shim once to get things properly vertical.  If the problem is extreme, consider bolts or a backboard to connect the sides of the units.
Both these options will improve overall stability of the pair.
Depending on the aesthetic situation, you could use anything from 3/4" BB grade plywood to birdseye maple for the boards.