Plenty of beachside cities are unaffordable, but there are still well-priced places near the ocean if you know where to look