Dispel Magic Only Ends Spells
A magical effect that is not the result of an ongoing spell cannot be dispelled.
Jeremy Crawford has issued several Twitter rulings to this effect.
In this Tweet:
Q: Can dispel magic undo a druid's wild shape
A: Dispel magic ends spells. Wild Shape isn't a spell.
and this one:
Q: Does Dispel Magic auto work vs Channel Divinity powers? Ie.. Paladin's Vow of Enmity magic effect.
A: Dispel magic ends spells. A Channel Divinity option like the paladin's Sacred Weapon isn't a spell.
and this series of Tweets:
Q: Does dispel magic effect an arcane ward?
A: Dispel magic ends spells. Arcane Ward isn't a spell
Q: Does that mean magical items cant be dispelled either? We've assumed that they could be disabled temporarily with dispel.
A: Dispel magic can end spells that come from a magic item, but it has no effect on the item itself.
Also note that Dispel Magic can only end spells with an ongoing duration. It cannot remove the lingering effects of an instantaneous spell. PHB P. 203:
Many spells are instantaneous. The spell harms, heals, creates, or alters a creature or an object in a way that can't be dispelled, because its magic exists only for an instant.
The March 2016 Sage Advice Column covers Dispel Magic as well. It reiterates that Dispel magic cannot end magical effects that are not the result of a spell, such as a vampire's Charm effect. It also reiterates the rule about Dispel Magic not working on the results of a spell with an instantaneous effect. It adds that a readied Dispel Magic cannot be used in place of a Counterspell, though in some limited circumstances, it may be almost as good.
To answer your actual question, in this context, targeting a magical effect clearly means you can target just one specific ongoing spell effect instead of stripping everything on a particular creature.
You only target one specific Effect, not all instances of an Effect of a certain type
You seem to be misunderstanding what it means by 'Magical Effect.'
Your interpretation of it is "A type of magical thing that is happening."
The actual meaning is "A Single, Discrete Magical Thing that is NOT a Creature or Object." You can't use Dispel Magic as an AoE Spell Purge to burn out all instances of a particular spell.
A Spell is a discrete Magical Effect
PHB201
When it refers to a Magical Effect, it is talking about things like Wall of Fire, Storm of Vengeance, Illusions, and so on. An individual instance of magic that is not attached to a creature or object. If that targeting option didn't exist, you couldn't Dispel effects like that, because a spell like Earthquake is neither a creature nor an object.
The target required by Dispel Magic is a specific target. Either 1 Creature, 1 Object, or 1 Magical Effect. You cannot target a type of magical effect.
And to give an actual Sage Advice quote...
Q: If dispel magic targets the magical effect from bless cast by a cleric, does it remove the effect on all the targets?
A: Dispel magic ends a spell on one target. It doesn’t end the same spell on other targets.
Best Answer
Can you dispel a magic effect you can't perceive?
Yes, as long as you can locate it somehow. If you can't find it somehow, then no. This reduces down to the related question: Can you target a target that you can't perceive? And the answer to that is a qualified yes. Yes, if you can land your dispel magic on the desired target somehow.
As we'll see, your example situations don't allow you cast the spell yet, because you haven't targeted anything. But first, let's look more at how targeting works.
Targeting spells
To target something, you need two things per Targets on PHB page 204 (unless the spell's own description lifts one of these, or adds new requirements):
The ability to choose the target
And dispel magic does require the ability to pick the individual target:
A clear path to the target
This isn't a problem in either situation you're asking about.
So in order to target something, you need to be able to individually choose it. To be able to do that, you need to know that it's there and where specifically it is. You often gain that information by sight, but sight is not required, only knowing the location of your target is required. This information can be gained by many other means: hearing, touch, divination magic, etc.
Now, about that qualified “yes” above: can you target something you can't perceive at all? Only if you have enough knowledge from something other than perception in order to correctly target it.
For example, if a god granted you divine intervention and whispered in your ear to say “the invisible wizard is hiding behind the third barrel in the south-east corner!”, then you'd be able to target that invisible wizard without needing to use a perception ability of your own. This choice would be “I target the invisible wizard right there, behind that barrel.”
As another example, if you had a note from a wizard that said, “cast dispel magic on the centre of the wall between the 11th and 12th statues on the left of the entry hallway of the Grand Palace”, that's enough knowledge to correctly target your spell at the illusion the wizard put in that exact location and reveal the secret door (or whatever is there). This choice would be “I stand in front of the wall between the two statues, and I target the magical effect that is right in front of me.”
Other than unusual help like that though, you generally need to be able to locate your desired target, which will almost always require some kind of perception on your part. We can't literally require “perception” in all cases though, because being too literal about that though would rule out some cases like the above where you obviously know enough to target the spell correctly — and we don't want that. D&D 5e is, after all, supposed to be sensible rather than literal-but-counter-intuitive.
The examples in the question lack targets… so far
So you could target something you can't see, but in the examples, no targets can be selected yet without changing the situation somehow.
Notably, you can't just choose a general type of magical effect and hope it is somewhere in range, because that's not targeting an individual magical effect. Dispel magic is not an area of effect spell! Just like you can't choose a magic missile at “any orcs in the room”, you can't dispel magic “any invisibility effects in the room”. You have to be able to pick a specific target and cast your spell at that target specifically.
That means that in both your examples, you can't just cast the spell at nothing, say “Invisibility, I choose you!”, and have dispel magic find the invisibility effect and dispel them just because it's within range. You didn't pick your target! Instead, in each situation, you have to do some more work to acquire and choose your target:
You have to locate the invisible hiding evil wizard somehow; most likely by using Perception checks (but divine intervention would work too). Once you positively acquire the knowledge of the position of the evil wizard, then they can be targeted by dispel magic.
You can't can't dispel magic on “any and all invisibility effects in range” because that's not how targeting works — that's not one, as dispel magic requires, that's multiple. You would have to pick one instance of an invisibility effect somewhere specific in the room:
Anything else isn't targeting, it's throwing a spell into the wind and hoping it magically does something its description doesn't say it does.