It is not common for a seafarer to be asked to pay for their own visa or flights as part of their employment on a yacht/ship. In most cases, the employer (e.g., the ship owner or operator) will be responsible for obtaining any necessary visas for their crew members and for covering the costs of their travel to and from the yacht/ship.
There may be some exceptions to this, however. For example, in some cases a seafarer may be required to obtain their own visa if they are traveling to a country on their own time (e.g., for vacation) while they are working on a yacht/ship. In such cases, the seafarer would typically be responsible for covering the costs of obtaining the visa and for their own travel expenses.
It is always important to carefully review the terms of your employment and any travel arrangements that are made on your behalf before accepting a position on a yacht/ship. If you have any concerns or questions about these matters, it is a good idea to discuss them with your employer or a maritime lawyer, PYA or Nautilus before agreeing to take the job.