NEW YORK—Barclays Plc. is not liable to investors who bought its U.S.-listed stock a few months before the 2008 financial crisis and accused the British bank of hiding its risky debt exposure and a capital shortfall, a U.S. court ruled on Nov. 19.