Hospital officials say the investment reflects a broader commitment to meeting Brooklyn’s growing healthcare needs.