End-to-end entanglement in Bose-Hubbard chains