Grammatically, there is no antecedent, hence no agreement is necessary (or possible)
The demonstrative hoc doesn't always have an antecedent. There is none here, any more than there is an antecedent for "that" in English in the phrase "that which contains all". Rather, this is the usage described as follows in Lewis & Short's entry for hic:
Very freq. referring to a thought that follows, and which may be expressed by a relative sentence [...]
α With relat. clause
My analysis implies that it is not possible for the word to agree with its antecedent in gender, which of course raises the question of how it does receive its gender. I would say the neuter is used here with the semantic meaning of "that (thing)".
I think the use of "hoc quod" weighs no more strongly against interpreting the referent as the Holy Spirit than the use of "which" instead of "who" in English
I will now move on to the theological question this seems to be based on. I don't think the neuter gender of "hoc quod..." excludes coreference with "spiritus Domini" (or necessarily implies a view of the latter as not being a person, in the theological sense), any more than the use of "which" instead of "who" does in the English version. There is a connotation when using "hoc quod" that you're not talking about a person, but I think this is rebuttable, especially when talking about God.
The God of Christianity is of course often described as a personal god, and in Trinitarian theology, God is considered to be three "persons". Despite this, however, it is obvious that the Holy Spirit is not the same kind of entity as a human man or woman, and I don't think that there is anything very strange about using a neuter pronoun in certain kinds of relative clauses that refer to the all-encompassing or all-powerful nature of God (where the implied meaning is that God is not only superior to all other persons, but to all created things). Consider that the neuter gender of Greek "πνεῦμα κυρίου" obviously doesn't prevent this phrase from having the same meaning as Latin "spiritus Domini". (Incidentally, I think "hoc quod continet" is a translation of the Greek neuter present active participle "τὸ συνέχον".)
As a comparison for the wording in Latin, consider the use in Aquinas of neuter pronouns in Summa Theologiae to introduce the relative clause used to define what the word "deus" means, such as "id quo maius significari non potest", "aliquid quo maius cogitari non possit" and "illud quo maius cogitari non potest". It is not ungrammatical to use "id", "aliquid" and "illud" in this context, despite the fact that "deus" is a masculine noun, because the gender of the pronoun does not depend grammatically on the gender of the word "deus". And it is semantically clearer to use a neuter pronoun to introduce this kind of relative clause because if you instead used "is", "aliquis" and "ille" in a definition of God (or if you used "he"/"someone" in English), it sounds like you're just talking about "someone greater than anybody else", which sounds too limited to express the idea of something greater than everything in the universe.
For the reasons above, I don't think it would be well founded to view "spiritus Domini" as being grammatically excluded from being the referent of "hoc quod continet omnia, scientiam habet vocis". Of course, there could be reasons aside from grammar to interpret this relative clause as referring to something else.