An answer to this is given in commentary on the Revised English Version (REV) Bible, which is written from a Biblical Unitarian perspective, here.
It can be translated as 'him' or 'one' instead of 'me', as is done in the REV, NAB, RSV, BBE, GNB, NJB, by Theodotion (into Greek), and by John (into Greek, see point 5.).
In particular, it is argued that the 'me' which we get from certain textual variants is an error, and certain textual variants more clearly read 'him'.
'Him' fits better with the flow of the sentence.
The traditional Jewish understanding does not seem to indicate this was read as 'me'.
None of the Greek texts of John 19:37, which quotes Zechariah 12:10, have 'me'.
The allusion to Zechariah 12:10 in Revelation 1:7 uses 'him'.
Some English versions of Zechariah 12:10 read: “They will look on me,
the one they have pierced…” (NIV). However, there are textual issues
involved in the transmission of the Hebrew text that we must examine
so that we have the right translation and meaning of the verse. Some
translators supply a first person pronoun (“me”) because they see this
verse as referring back to God and hence they translate “they will
look on me.” But other translators supply a third person pronoun
(“him,” or “the one”) because they see the phrase referring to someone
other than God. Both the Revised Standard Version (RSV) and the New
American Bible (NAB) translate the phrase as “so that when they look
Translators and commentators who believe that the word “pierced”
should refer back to the pronoun “him” cite textual variants that more
clearly read “him.” This agrees with the flow of the sentence that
continues with the word “him” in the phrases “they shall mourn for
him” and “grieve bitterly for him.” The Jewish understanding of this
verse has always been that the one pierced was one in an intimate
relationship with God, but there is no record of any early Jewish
commentator understanding Zechariah 12:10 to be saying that somehow
Yahweh Himself would come into the flesh and be “pierced.” Instead,
this verse relates to the piercing of the promised Messiah, whom many
in Jerusalem would mourn and weep for, and thus it is apparent that
the RSV and NAB offer a better translation of the verse in order to
convey this meaning.
Another important reason to believe that “him” is the correct reading
of the original text of Zechariah 12:10 is the way it is quoted in
John 19:37, after the Roman soldier thrust his spear into Christ’s
side. The Greek text of John 19:37 reads: “and again, another
scripture says, ‘They will look on the one they pierced.’” Different
English versions may disagree on whether the Hebrew text of Zechariah
12:10 says “me” or “him,” but none of them disagree on the translation
of the Greek text in the New Testament. None of the versions include a
first person pronoun (“me”), and most of them supply the word “him” as
does the KJV, NAB and RSV. If the original reading of Zechariah 12:10
read “me” instead of “him,” then “me” would almost certainly be the
reading of John 19:37. On the other hand, the New Testament quotation
in John 19:37 agrees with the reading of Zechariah 12:10 in the RSV
and other versions. Therefore, we believe that the proper reading of
Zechariah 12:10 is “him,” and that is reflected in John 19.
Not only is Zechariah 12:10 quoted in John, but also it is alluded to
in Revelation. Revelation 1:7 says, “Look, he is coming with the
clouds, and every eye will see him, even those who pierced him; and
all the peoples of the earth will mourn because of him. So shall it
be! Amen.” Commentators freely admit that this verse alludes back to
Zechariah, and it uses the pronoun “him” and not “me.” This is more
evidence that the Hebrew text of Zechariah should read “him,” or “the
one,” and thus we conclude that the internal evidence of Scripture
suggests that the one who is pierced in Zechariah is not God Himself
but one who is in an intimate relation with God, i.e., the Messiah.
Regarding John 19:37 (point 5. above), also see Ellicot's commentary, which states
The words, as they occur in the Authorised version, of the prophecy
are, "They shall look upon Me whom they have pierced," but the reading
which St. John has followed is that of many MSS., and is adopted by
many Rabbinic (as Rashi and Kimchi) and many modern authorities (as
Ewald and Geiger).
The article Zechariah 12:10, written from a Biblical Unitarian perspective, also contains the following point.
[A]lthough we do not believe that “me” is properly supplied in many
versions of Zechariah 12:10, it certainly is the case that God was
“pierced” when the Messiah was tortured and put to death. When Simeon
met Joseph and Mary in the Temple when they came to consecrate Jesus,
he said to Mary, “A sword will pierce your own soul too” (Luke 2:35).
Commentators freely admit that this statement is not referring to the
physical piercing of Mary in any way, but rather is referring to the
grief that Mary will endure as she watched her son be tortured and
killed. Thus Scripture gives us evidence that, if Zechariah said,
“they will look on [or “unto”] me who they have pierced,” then he was
saying that God’s heart would be pierced. If “me” is the true reading
in Zechariah 12:10, then the Bible tells us that both the hearts of
God the Father of the Messiah and Mary the mother of the Messiah were
pierced when Jesus their Son was tortured and killed.
So, whether one concludes the correct version of Zechariah 12:10 is 'me' or 'him', there is Biblical precedent for understanding this sort of language figuratively, in particular at Luke 2:35.