Superglass formation in an atomic BEC with competing long-range interactions