Costco will reprogram fairly new hearing aids that you inherited from a family member or a partner - ie your grandma died and left you these hearing aids, this is fair enough - you can probably talk to the store, explain your circumstances, provide some kind of proof, this is my grandma, this is her Costco card, this is her purchase agreement, this is her death certificate, they will probably do it. When it becomes yours, there is no warranty on it, but you got a hearing aid for free and Costco is spending time and money, also providing you services for that hearing aid for free - so fair enough, no warranty.
The problem with hearing aids bought off ebay though is they are often lost/stolen. Because Costco has that one-time replacement policy sometimes what people do is - they ‘lose’ their hearing aids, claim for a new one from Costco, and then sell the old one on eBay. Are you kidding me! Costco can tell, because it’s been reported stolen or lost! No way they’re touching that!
Go ask for a refund from the seller.