Hubble investigates a magnetar’s birthplace