A row has broken out over who should foot the £11m bill to improve flood defences on a Welsh seafront.