You can look at salary ranges on levels.fyi to get some indication of what pay is in different companies and cities in the US. For top level companies you can be looking at starting salaries around $150k for Bay Area.
Also, the entirety of Japan isn't relatively wealthy, just like the US. The rural areas are dramatically cheaper to live in (for housing mainly) than the big cities. However, there's less "spread" than in the US: all the software jobs are going to be in a handful of large cities, not in some remote prefecture or village (whereas in the US, there are jobs in some smaller and even very small cities, where that one employer is likely the only place you can get such a job nearby and you'll have to move if the job goes bad). But even if you just look at Tokyo, the pay range can be enormous, at least a full order of magnitude.