Hi Sedna
The second conditional, used when speaking hypothetically, is structured as follows: if + past simple >> + would + infinitive. For example: If I had enough money, I would buy a house. If I met Keith Richards, I would ask for his autograph.
When the verb in the if clause is 'be', it becomes 'were'. This is a peculiarity of the subjunctive mood, and is also used when we express wishes. Example: I wish I were a dog. If I were a dog, I would sleep all day. However, because people are used to saying "If I was" in the past tense, they often get this wrong. It is a very common mistake - so common that Meghan Trainor probably doesn't even realise that it's wrong!
It is a similar situation with "If I would win the lottery". This structure is incorrect. The correct way to say it is "If I won the lottery", or "If I were to win the lottery". However, in many regions of the US they make the mistake of doubling conditionals, e.g. "I wish I would have been there," instead of "I wish I had been there".
Just because a lot of people do it, doesn't mean it's right! I hope this helps.