Do you pay VAT (or other taxes)? - Depends entirely on the exact locale where the sale/transfer takes place. Nothing to do with either flag state or your citizenship/residency, it is all about the rules where the
sale happens.
Unless you can convince the owner to go all the way through sea trials and
survey with no
money down you should find an escrow
service to handle the
money. Again, all depends on locale. If the owner is willing to get to the end with no money having changed hands, and you are happy with all
survey results then you just pay at the end.
Are you able to keep it flagged in Spain? Don't know the rules on that one, but if you are a US citizen no reason you can't flag and document the boat with the USCG where it is. If you use the simplified measurement
rule for recreational vessels the boat never has to be in the States, or even looked at by anyone official, you just fill out the paperwork and send it in with your check. You will need a little
research on whether Spanish
registration conveys title, because you will need positive proof of
ownership. And you would need the help of the
current owner to convey the title and remove from Spanish registry, proof of which will all have to go to the USCG - properly notarized - give the CG a call to get the lowdown, or (shudder) hire a
documentation agency to make sure all the t's are crossed.
Duties and US
taxes (if any) would only be owed when you bring the boat back to the States. You can even enter USVI without paying those - it is outside the
Customs Territory of the US.
Puerto Rico, on the other hand, is not, and duties (if any) would be owed when you enter PR. Duty is low, generally 1.5%, although it does depend on some specifics.
FWIW I have purchased two
boats overseas, and imported one of them. Not much different than doing it locally, except that you have to learn the rules of the place where you will be doing business. "The Caribbean" is insufficient to provide any more detailed answers - there are 16 sovereign nations and 12 territorial dependencies in the Caribbean, and each has its own set of rules. If the boat is in the
water and the owner is willing to move it then you can shop your location for the
sale to find the easiest/cheapest process.