Effect of built-in bias fields on the nanoscale switching in ferroelectric thin films