The contingency spell ends
The Statue has to remain a statue to still be the material component
As you quoted, the relevant part of contingency is:
Also, contingency ends on you if its material component is ever not on your person.
So let's start with a basic assumption. If the material component changes sufficiently so that it's no longer a statue, the spell will end. This is because, simply put, the material component in the spell description is:
A statuette of yourself carved from ivory and decorated with gems worth at least 1,500 gp
If the statue magically changes into something else, (like a teapot for instance) then it isn't a statue anymore by definition. And since the spell's material component is by the spell's own description a statuette, you can't have "the material component" on your person anymore if the statuette you used isn't a statuette anymore.
What does it mean for the gear to "meld?"
The relevant part of polymorph is:
The target's gear melds into the new form.
There is no official game term here so we use common language. Merriam-Webster defines meld as:
merge, blend
And it defines merge as:
to cause to combine, unite, or coalesce
When your gear melds into your new form, it becomes part of your new form's substance. That is: it changes from whatever material it used to be into the flesh, fur, skin, etc. of the new form. In that case, the statue material component no longer exists as a statue. It is now something else.
Think of it like mixing a stick of butter into a cake batter. The stuff that made up the stick of butter is still inside the batter, but it's been broken down into the batter. If I pick up the bowl of batter, I don't have a stick of butter on my person. I have a bowl of cake batter on my person.
The statue doesn't exist as a statue anymore, so it can't be on your person
Since the statue isn't a statue anymore, the material component cannot be on your person. And since contingency says:
Also, contingency ends on you if its material component is ever not on your person.
That means the contingency spell ends.