I would first speak with the HOA about the situation then I would talk with the escrow officer that handled the transaction. I am surprised the 2nd HOA wasn't disclosed throughout the entire process, no mention of it in the Multiple Listing or any escrow docs? I would review them just to be sure before you call. Did you receive a HOA package of their rules and regulations, minutes to their meeting and more (typically sent directly from escrow to you)? With 2 HOAs I would expect you to receive 2 of those packages to review during your contingency time period.
The HOA dues are typically the responsibility of the owner of the property. But you may have to argue that you did not get any benefit of the HOA since you did not have access to the facilities they support (assuming they offer some value to you as the new homeowner). They may be willing to negotiate if you have no luck with escrow. I would also contact your Realtor, if they work in the area they should have knowledge that your community was serviced by two HOAs.
I'm really surprised the transfer didn't take place at the close of escrow,
Good luck to you,
Brian Wilson, Realtor