The massive residential and retail development that could transform the Bayside neighborhood and ease Portland’s housing crunch received site plan approval from the Planning Board on Tuesday, on the condition that the developer redesigns the project’s largest building to break up the facade, improves the rooftop and eliminates certain materials from the ground floor. A lawsuit over the original size of the project, design concerns among planning officials and opposition from a neighboring business contributed to a delayed vote and worries about the city losing the project, which was first proposed five years ago by The Federated Cos., a Miami-based developer. Known as “midtown,” the project would be built on 3.5 acres along Somerset Street between Pearl and Elm streets, a former industrial neighborhood next to Interstate 295 that has been home to rail yards, scrap yards and warehouses.