There is almost no question that the future commander would win.
Quite simply, the scale and speed of modern warfare would elude a commander from 500 (or even 50) years ago. The capabilities of modern weaponry - precision bombing, drones, night fighting, computerized targeting systems, C&C have advanced so far, so fast that even a legendary commander* would have difficulty even comprehending the capabilities of modern weapons.
A future commander may be hamstrung and frustrated by the lack of capabilities they are used to, but they would have a general grasp of the what they can - and can't do or how to use those weapons. In a technical sense, they aren't going to be operating the weapons themselves - they aren't going to be befuddled trying to use alien and archaic tools. Sure, they might not know the first thing about operating a mechanical fire-control system, but the people who are operating it know what they are doing. The challenges will be abstracted away by things being slower / less accurate than they are used to, but still fit in the framework of their knowledge.
Add to that the fact that modern warfare and tactics developed from the warfare and tactics of the past. Virtually every general is a student of history, and would have at least a general understanding of the tactics the general from the past would know and understand. They would also, since tactics of thousands of years ago are still widely studied, know how to effectively counter them.
They would know not to charge pikemen with cavalry, but they might use their knowledge of how pikemen counter cavalry to force them into an infantry square...then drop a load of napalm on it.
Now, it's possible that warfare / humanity will have changed so much in 500 years that a future commander simply couldn't adapt. It's quite possible that all the future commander knows is to press the 'nanobot kill' button on an iPad and the war is over in seconds. Still, just a general understanding of history will be a huge leg up.
*A famous / legendary leader might be at even more of a disadvantage. A commander like Napoleon or Rommel has / is / will be studied at a level of detail that far surpasses a commander forgotten to history. In most cases, those massive historical victories are as much a product of circumstance as they are genius (and those brilliant and disruptive strategies won't come as a shock to someone who studied them). Bold, risky behavior only works when someone isn't prepared for it, and taking those risks is generally what made the legendary commanders legendary.