TOKYO—Japan’s government said on Wednesday it would investigate messaging app Line, owned by SoftBank Corp’s Z Holdings Corp, after Japanese media reports that it let Chinese engineers at a Shanghai affiliate access Japanese users’ data without informing them. Under Japanese privacy regulations, companies have to let users know when their personal data is sent overseas,…