Team Dream are based upon a tidbit of information regarding Sonic Heroes development. According to Shiro Maekawa on Twitter, one team considered in the concept stage was a team consisting of Gamma, Chaos Zero, and Big.1
The fanonical makeup of Team Dream (which will be explained shortly) is additionally inspired by the roster of unlockable characters in Sonic Shuffle, which includes Super Sonic and a Chao.2
The following is the fanon-lore reasoning behind each character's inclusion, and their place in the story of Sonic Heroes.
(Spoilers for SA1.)Due to the neutralisation of E102 Gamma at the end of Sonic Adventure, the presence of him in this team informed most of the lore. E102 continues to exist, but only within the mind of Birdie's sibling who 'piloted' him, manifesting within the dreamscape of Maginaryworld. As such, all of Team Dream can only exist and operate within Maginaryworld.
Gamma forms the Flight class of Team Dream, because he has a jetpack and propeller3 and the others fit Power and Speed better.
Chaos arguably could also present a bit of a problem since, according to some sources, he's @#$%ing dead4... but other sources depict him as still active on Earth.5 I have my own fanonical take on this, of course, but suffice it to say, setting the events in Maginaryworld would probably allow me to handwave it either way.
Note that I can't decide whether to depict Chaos as himself, or as a subconscious projection of his stunted psyche taking the form of an infant Chao. On the one hand, the former was the concept in Heroes, to do otherwise requires a clunky explanation of Chaos' psyche, and it makes sense with him having to fill the Strength role of the team. On the other, the Chao is the playable character in Shuffle, and making that the power character (even holding a gun like in that one minigame)6 is really funny.
(Actual fanon spoilers now.) The identity of who Super Sonic represents in the waking world is a major fanonical plot point, and answers the cliffhanger ending of Team Dark's story in Heroes.
Yes, Super Sonic is Shadow's dream form, and since I place the events of Shuffle concurrently with Heroes (otherwise... there'd be less point to depicting them in this team format), the implication is that the 'Shadow' awake for the events of the game was indeed an Android.
Well... I guess it only implies that if we assume your dream form only appears when you're asleep... and I just said Maginaryworld mechanics could be 'handwaved'. But that's the intended inference.
As for what this form implies about Shadow's character, see here.
Super Sonic is the Speed class member of Team Dream.
Team Dream was formed during the events of Sonic Shuffle by Lumina Flowlight, following the partial destruction of the moon in Sonic Adventure 2.a