Proverbs 8:1-3 clearly states that what is coming afterwards (including 22-31) is the voice of wisdom and understanding, so it is not a statement about Moshiach, but rather a statement about the value of wisdom.
The two Hebrew words for wisdom and understanding are Chochmah and Binah. This question explores the difference.