With Bank of America Corp.’s $16.7 billion settlement over the marketing and sale of subprime residential mortgage-backed securities, prosecutors closed out the largest remaining government enforcement actions stemming from the financial crisis.

The development promises to affect a number of Wall Street firms that have derived enormous revenues from the investigations and litigation.