Work hard. Make sure that nobody on the team outworks you. A high school baseball coach who is already leaning toward playing somebody else will be searching for any excuse to bench you in favor of that person. So don't give the coach any reason to question your effort. If that includes your working on your game even outside of normal practice or game time, then that's what you need to do.
Show your versatility. High school baseball is a game that requires that nine positions be filled, so try to become adept at as many positions as you can. If the coach has a political reason to play a certain kid at shortstop, for instance, then you wouldn't have much of a chance to play if that was your only position. Versatility is a valuable tool on any winning baseball team, and, in your case, it could be the key to getting on the field.
Don't accuse the coach of using politics to determine his team. Even though it may be true, someone who's playing a political game with his high school baseball team is unlikely to admit it and could hold a vendetta against someone who calls him on it. Your best bet is to try to ignore it and concentrate on what you can control, which is your own performance.
Be patient. There will be times when it seems there's no way to break through in this situation. But the bottom line in any sport is the team's record. If a coach starts losing games, his self-preservation instincts will kick in and he's likely to start playing the best players regardless of any political overtones. If you're one of the best, you'll get your chance to play. This advice is especially true if you're an underclassman.
Produce when given the chance. You can't really complain if, when you get your opportunity to get the job done, you fail. Prepare yourself as if you're going to play even if it seems you're going to be stuck on the bench. In a sport such as high school baseball, opportunities to contribute can arise from nowhere, so you need to be able to come through in such situations.