Five Lancashire towns will get up to £20m to help rejuvenate their neighbourhoods and boost local economies.