Broadening of the Berezinskii-Kosterlitz-Thouless superconducting transition by inhomogeneity and finite-size effects