The star ratings are relative to your squad, but keep in mind that scouts can make mistakes or slight misjudgements. If that 4-star wingback you're looking to buy is playing in a league that's considerably worse that your is, your scout can overestimate the player's ability. Or he can underestimate a player's ability if the player you're scouting isn't playing regularly or is playing at a much higher level where he isn't comfortable yet.
Also, if the player is in form, that means he gets an extra half a star.