Spectral function of Mott-insulating Hubbard ladders: From fractionalized excitations to coherent quasiparticles