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.
Yes, Flexible Casting doesn't specify where the spell slot comes from, just that you expend one to gain points. This means that you can expend a spell slot that you have from Pact Magic to satisfy its requirement, and thus gain sorcery points from it.
And yes, this has been confirmed as the correct reading by Jeremy Crawford, the lead rules designer for D&D 5e, for exactly the use you're asking about (though Crawford's tweets are no longer considered official rulings):
Bill Cavalier @dungeonbastard · 6 May 2015
@JeremyECrawford Can a warlock/sorcerer covert warlock spell slots to sorcery points?
Jeremy Crawford @JeremyECrawford · 6 May 2015
The sorcerer's Flexible Casting feature is omnivorous, able to turn spell slots from any class into sorcery points.
Bill Cavalier @dungeonbastard · 6 May 2015
@JeremyECrawford The use case is: convert warlock slots to sorc points, short rest, regain warlock slots. Turning a short rest asset to long
Jeremy Crawford @JeremyECrawford · 6 May 2015
@dungeonbastard Yep, that works. Similarly, a paladin/warlock can use warlock slots for Divine Smite. Warlocks have so few slots on purpose!
Best Answer
Yes, an unattuned magic weapon can be a pact weapon.
While not attuned to a magic weapon requiring attunement, you don't benefit from its magical properties... but that doesn't suspend its classification as a magic weapon.
Here are the relevant rules for Attunement from the Basic Rules:
However, nothing in that rule indicates that the magic weapon stops being a magic weapon while you're not attuned to it, only that you can't benefit from its magical properties during that time. Being a "magic weapon" isn't really a property, per se. It's a categorical description of the intrinsic nature of the weapon.
Now refer to the rules of the Pact of the Blade feature:
There's no stipulation other than that the magic weapon you turn into your pact weapon must be... a magic weapon. It still is, even when you're not attuned to it.
Note that the unattuned magic weapon as a pact weapon still benefits from being treated as magic according to the Pact Boon feature simply because it is a pact weapon (any pact weapon is treated as such whether it is a magic weapon or not), much less because it is still a magic weapon: