We can likely find the answer from Rashi's own words elsewhere. In his commentary on Esther, after the list of Haman's Ten Sons in Esther 9:10, Rashi writes:
עֲשֶׂרֶת בְּנֵי הָמָן. רָאִיתִי בְסֵדֶר עוֹלָם אֵלּוּ י' שֶׁכָּתְבוּ שִׂטְנָה עַל יְהוּדָה וִירוּשָׁלָיִם כְּמוֹ שֶׁכָּתוּב בְּסֵפֶר עֶזְרָא "וּבְמַלְכוּת אֲחַשְׁוֵרוֹשׁ בִּתְחִלַּת מַלְכוּתוֹ כָּתְבוּ שִׂטְנָה עַל ישְׁבֵי יְהוּדָה וִירוּשָׁלָיִם". וּמָה הִיא הַשִׂטְנָה? לְבַטֵּל הָעוֹלִים מִן הַגּוֹלָה בִּימֵי כוֹרֶשׁ, שֶׁהִתְחִילוּ לִבְנוֹת אֶת הַבַּיִת וְהִלְשִׁינוּ עֲלֵיהֶם הַכּוּתִים וְהֶחֱדִילוּם וּכְשֶׁמֵּת כּוֹרֶשׁ וּמָלַךְ אֲחַשְׁוֵרוֹשׁ וְהִתְנַשֵׂא הָמָן, דָּאַג שֶׁלֹּא יַעַסְקוּ אוֹתָן שֶׁבִּירוּשָׁלַיִם בַּבִּנְיָן וְשָׁלְחוּ בְשֵׁם אֲחַשְׁוֵרוֹשׁ לְשָׂרֵי עֵבֶר הַנָּהָר לְבַטְּלָן:
The ten sons of Haman. I saw in Seder Olam: These are the ten who wrote a [false] accusation against Yehudah and Yerusholayim, as it is written in the Book of Ezra: “And during the reign of Achashveirosh, at the beginning of his reign, they wrote an accusation against the dwellers of Yehudah and Yerusholayim.”1 And what was the [purpose of the] accusation? To stop those who were coming up from the exile during the days of Koresh, who had started to build the Beis Hamikdosh, and the Cutheans slandered them and stopped them.2 But when Koresh died, and Achashveirosh reigned, and Haman was promoted, he [Haman] saw to it that those in Yerusholayim would not engage in the construction, so they [Haman’s ten sons] sent in the name of Achashveirosh to the princes of the other side of the river to stop them [from building].
Thus, Rashi states that Seder Olam is his source that the ten sons of Haman sent the accusatory letter.
Next, we can look to Rashi's commentary on Megillah 16a. The Talmud described how Shimshai the scribe erased the description in the king's chronicles of how Mordechai saved the king from Bigtan and Teresh and Gavriel (re)wrote it. Shimshai is not someone who appears in the text of the Megillah, but is the scribe from sefer Ezra who wrote the accusatory letter. Rashi writes:
שמשי - סופר המלך שונא ישראל היה ומימות כורש היה כמו שנאמר בספר עזרא (סימן ד) שכתב שטנה על בנין הבית עד שבא כורש וביטלו ואף בימי אחשורוש עשה כן שנאמר (שם) ובמלכות אחשורוש בתחלת מלכותו כתב שטנה:
The King's scribe. He was an anti-semite from the times of Cyrus as it says in Ezra "that Sitna (a play on "hatred" --Translator) wrote against building the Temple until Cyrus cancelled [the order]; he did the same in the days of Xerxes as it says "in the days of Xerxes at the beginning of his rein Sitna wrote."
Apparently, then, Rashi put two and two together in his commentary on Ezra, where Shimshai actually occurs in the text. Seder Olam which said that Haman's 10 sons sent (and perhaps therefore wrote) the accusatory letter, and the gemara in Megillah which said that Shimshai wrote the accusatory letter. Therefore, Shimshai must have been one of those 10 sons.