JP Morgan Chase & Co. has won the bidding war for First Republic Bank, acquiring the ailing business after rescue efforts failed to undo the damage from wrong-way investments.