The Chicago school system needed money—fast. Two Wall Street players saw an opportunity to invest.

J.P. Morgan Chase & Co. and Chicago-based Nuveen Asset Management have made realized and paper profits exceeding $110 million on purchases this year of $763 million in Chicago Public Schools bonds. The school system has said it needed the money to replenish its dwindling coffers before the new school year and to build and repair facilities.

The...