Two small communities on the Fylde coast are in line for £20m each to give them a new lease of life and help revitalise their public spaces.