Below is a pared down interlinear of the segment in question, taken from biblehub.com (Interlinear). Though I’m not conversant in Hebrew, I’ll try to present the translation issues of Ezekiel 21:10 as best I understand them.
א֣וֹ נָשִׂישׂ שֵׁבֶט בְּנִי מֹאֶסֶת כָּל־עֵֽץ׃
wood all it despises of my son the scepter should we make mirth then
Translating this part of Ex 21:10 is difficult apparently due to a lack of punctuation, connecting words, or clear indicators of case (subject/object markers). For the purpose of this discussion, I have divided the words into four syntactical units, presented below in the order taken from the interlinear (Note: I will reference these units according to how they are worded in the KJV, even when translations have rendered them differently):
- should we then make mirth?
- the rod of my son
- it contemneth
- every tree
Each unit is like a piece of a puzzle that can be put together in different ways depending on the choice and placement of punctuation, and the addition of connecting words. The differences in how each piece is understood and the ways they are put together account for the variation seen in the English translations. For example, while “should we make mirth” is generally translated as a question/interrogative statement, differences in where the question mark is placed can have a significant impact on meaning:
Should we then make mirth? – KJV
Shall we rejoice in the scepter of my royal son? – NIV
Or shall we rejoice, the rod of My son despising every tree? – NASB
While there is much that can be said regarding the differences among the translations, I want to focus on those that pertain to the unit “the rod of my son.” Specifically, I examined a number of translations, looking at which syntactic function "the rod of my son" is assigned in each, whether it is construed to be the subject or object, or given some other role.
First I note that the verb “contemneth” is feminine and singular. Since it agrees with the sword (v9) in number and gender, “sword” is understood to be the antecedent of the “it” in “it contemneth.” Accordingly, some translations have “sword” as the subject with “every tree” as the object. In these translations, the unit “the rod of my son” is joined to that of “should we make mirth” and functions in a qualitative capacity.
Shall we rejoice in the scepter of my royal son? The sword despises
every such stick. – NIV and BSB
Or shall we rejoice in the scepter of My son? The sword despises every
tree. – LSB
Other translations, like the NASB above, equate “the rod of my son” with the sword and make “the rod of my son” the subject and “every tree” the object.
my Son's scepter, the sword, is despising every tree – ISV
the rod of my son, it contemneth every tree – ERV
Still other translations draw a sharp distinction between the sword and “the rod of my son.” In these translations, “the rod of my son” functions as the object while “every tree” functions in a qualitative capacity.
It contemneth the rod of my son, as every tree. – KJV
It is despising the scepter of My son [as] every tree. – LSV
Returning to the OP’s question, I think the underlying reason why Ez 21:10, as well as the passage in general, is hard to translate has to do with the style and composition, which is more poetry than prose. Poetry generally disregards grammatical rules. Relying on imagery and other literary devices, it constructs messages with a minimum of words yet of often greater depth and breadth of meaning, if of less precision and clarity, than that of prose. In my opinion, the terseness and ambiguity of Ez 21:10 allows the same words to convey different meanings depending on one’s point of reference, whether that be from a particular point in time or from a spiritual rather than a historical perspective.
While I cannot unpack all the shades of meaning in Ez 21:10, I’d like to address one point. The OP notes that “I am aware that verses 25 to 27 are taken by Christians to be a prophecy about the future Messiah, the Son of God, but there seems to be a clear distinction between ‘my son’ in verse 10 and this later part.“ I would say that the words of Ez 21:10 are especially applicable to the Messiah, recalling how he is pierced and the mirth of the mocking spectators.
In context Ezekiel 21 depicts how the sword, the instrument of God’s justice, is sharpened against the sins of men. Into this setting appears one who is called “my son,” and it is against “the rod of my son” that the sword pours out God’s wrath, as though it were any tree, as though it were every tree (cf Ezekiel 21:13). The tree here is evocative of human weakness and frailty, or of all humanity.
Viewed through the lens of God’s mercy, the words of Ez 21:10 can be seen as a cause for rejoicing, referencing Christ’s triumph over death and sin. From this perspective, the connection between verses 10 and 27 then becomes more clear, and the words of v27 understood as marking the turning of the tide against the reign of death and sin.
27 I will overturn, overturn, overturn, it: and it shall be no more,
until he come whose right it is; and I will give it him.
Yet still, the words hold a vision of a future that remains to be fulfilled, when “the rod of My son” will be raised in judgment against all men. The words “should we make mirth?” then becoming a call for all to repent and mourn.