Try resetting your network settings–this usually works for me.
Reset your Network Settings. Tap Settings > General > Reset > Reset Network Settings
Another thing to try: go to Settings > WiFi and tap on the “i” next to the public network. Next, tap “Forget this Network” and try again. Make sure you open Safari and see if there’s a sign-on screen–sometimes this takes a few attempts to work.
This page might also help: https://appletoolbox.com/2017/11/iphone-cant-connect-to-unsecured-network-fix/