The deal is valued at $451 million and includes more than 5,000 apartments across 90 buildings, most of them subject to rent regulation.