Depends entirely on the establishment. Those businesses set their own policies and get to choose who's allowed in and who's not based entirely on their own whims. Some allow people who speak Japanese, some won't let anybody who looks foreign. And prejudice doesn't have to make any sense: a while back, in the Otaru onsen case that ended up in court, one naturalized Japanese citizen was told that his Japanese-looking daughter would be allowed in but his more white-looking one would not.
And FWIW, "Japanese only" signs are a thing nearly exclusively in the adult nightlife/sex industry. I've never run into a single one in years of living in and traveling all around Japan, and the few times people have been hesitant about letting blond & blue-eyed me in, speaking Japanese has always assuaged their concerns.