I think they count as magical in three cases, but not in all others.
The berserker axe and hammer of thunderbolts (DMG), and another weapon from Hoard of the Dragon Queen, are always magical
For concreteness, let's look at the berserker axe, the first attunement-requiring weapon in the DMG. Its description reads, in part (DMG p. 155, emphasis mine):
You gain a +1 bonus to attack and damage rolls made with this magic weapon. In addition, while you are attuned to this weapon, your hit point maximum increases by 1 for each level you have attained.
Grammatically, it would seem that only the HP-benefit requires attunement, and that the +1 bonuses apply the moment you swing it. Then, by dint of having a magical +1 to attack and damage, I'd say the attack is magical and cuts through the shadow's resistance. (groan)
The hammer of thunderbolts also has this "severable" construction to its features, as does (HotDQ spoiler)
the greatsword Hazirawn, held by Wyrmspeaker Rezmir (HotDQ episode 8)
These two are definitely a close call, though. Perhaps even a toss-up.
In all other cases, the item only grants its nonmagical benefits
Most attunement-required weapons don't have this sort of provision, and it would seem that all of their magical utility requires attunement. See, for example, the holy avenger, flame tongue, staff of _____, sun blade, sword of _____, etc.
Further, the "Attunement" rules include the following statement (DMG, p. 138):
Without becoming attuned to an item that requires attunement a creature gains only its nonmagical benefits.
Certainly it looks like all of the other weapons, then, wouldn't give you their magical benefit without attunement. Moreover, the berserker axe does, in fact, require attunement, so this would seem to argue that you don't get any magical benefits from the axe. So perhaps even the berserker axe and hammer of thunderbolts need attunement to cut through resistance.