According to the midrash quoted in Rashi, these two men were Datan and Aviram, later known to us from their rebellion in Sefer Bamidbar.
At first, this identification seems extremely arbitrary. Obviously the midrash likes to say that anonymous characters were actually individuals named elsewhere (the refugee who reported to Avraham was Og Melech Habashan; the "man" directing Yosef to Dotan was the angel Gavriel). But just because one pair of people appears here and another in Bamidbar, is that really enough to equate the pairs?
In fact, there is a quite interesting parallel between this story and what Datan and Aviram do later. Let's list the ways in which this episode parallels later events.
- One of the men here is called "evil", and the other may be too. Datan and Aviram were also an evil pair. (OK, this one is trivial.)
- The men question whether Moshe is their ruler and judge. Indeed, Moshe later became the ruler and judge of the Jewish people, and Datan and Aviram (among others) questioned this authority.
- The man accuses Moshe of wanting to kill him, just as he killed the Egyptian. This parallels the plagues (in which Moshe did indirectly kill many Egyptians), as well as the complaint of Datan and Aviram (and others) that Moshe intended to kill the Jewish people in the desert.
- Somebody tattled about Moshe's killing of the Egyptian, forcing Moshe to flee to Midian. This reminds me of the rebels against Moshe in the desert, who frequently employed slander in their cause. The most obvious example is the spies' description of the land. Also, Datan and Aviram accuse Moshe of "rul[ing] over" the people (Bamidbar 16:13). What exactly this implies is unclear, but Moshe's protest in the next verse ("I have not taken even one of their donkeys, nor have I done wrong to any of them") might mean that Datan/Aviram falsely accused him abusing power, by confiscating property from the people.
The remaining three are less obvious. But each one is an elegant comparison in its own way. Put them all together, and a clear thematic resonance is apparent. We'll never know if the two men were in fact Datan and Aviram. But we do know that this episode was similar to Datan and Aviram's story in many ways.
[See also Nedarim 64b which suggests a linguistic connection between "nitzim" (here) and "nitzavim" (Bamidbar 16:27). But I find it hard to believe this is the only source of the midrash.]