MANILA—For years Filipinos with professional ambitions knew the surest way to realize them: leave the Philippines.

Since the 1970s, Filipinos by the millions have left the country—many for jobs as domestic helpers, chauffeurs and construction workers, but also doctors, academics and tech professionals who saw no prospect of earning a good salary or achieving their career goals at home.

But...