Concerns about safety, including on public transportation, have contributed to a reluctance to go back to the office. Soon after a gunman shot and killed a Goldman Sachs Inc. employee on a New York City subway train in late May, David Solomon’s email inbox started filling up. Staffers shared their grief and alarm with the Goldman chief executive. They also had questions about the viability of returning to the bank’s Manhattan office, according to people familiar with the matter.