Well, here are my results at testing Download. I tested each situation 4 times. I used wild Ditto that transformed into my defending pokemon on turn 1. I then switched out my Downloaders on turn 2.
Note: I didn't hack my pokemon this time, but I used Vitamin Modifier codes on many Porygon-Zs to adjust their stats. My defenders were just random lvl1 pokemon with equal stats.
Downloader with Balanced Offensive and Defensive stats against Defender with balanced Offensive and Defensive stats:
Special Attack was raised every time.
Downloader with equal Offensive stats, but higher Def than SpD against Defender with balanced Offensive and Defensive stats:
Special Attack was raised every time.
Downloader with equal Offensive stats, but higher SpD than Def against Defender with balanced Offensive and Defensive stats:
Special Attack was raised every time.
Downloader with equal Offensive and Defensive stats against Defender with balanced Defensive stats, but higher Atk than SpA:
Special Attack was raised every time.
Downloader with equal Offensive stats, but more Def than SpD against Defender with balanced Defensive stats, but higher AtK than SpA:
Special Attack was raised every time.
Downloader with equal Offensive stats, but more SpD than Def against Defender with balanced Defensive stats, but higher AtK than SpA:
Special Attack was raised every time.
Downloader with equal Offensive and Defensive stats against Defender with balanced Defensive stats, but higher SpA than Atk:
Special Attack was raised every time.
Downloader with equal Offensive stats, but more Def than SpD against Defender with balanced Defensive stats, but higher SpA than Atk:
Special Attack was raised every time.
Downloader with equal Offensive stats, but more SpD than Def against Defender with balanced Defensive stats, but higher SpA than Atk:
Special Attack was raised every time.
I tested every possible situation I could think of, but SpA was the only stat that was raised. I guess Nintendo was just lazy and saw that since Porygon-Z and Porygon-2 both had higher base SpA, and were the only ones with download, they just made Download boost the highest stat in each case.