Yes, the attack is made at disadvantage; the only difference is what happens to the flask
As stated in your quote, regardless of whether you splash the contents of the flask at a creature within 5 feet or throw it at a creature up to 20 feet away, you make a ranged attack.
The rule on making a ranged attack with an enemy within 5 feet of you says:
Aiming a ranged attack is more difficult when a foe is next to you. When you make a ranged attack with a weapon, a spell, or some other means, you have disadvantage on the attack roll if you are within 5 feet of a hostile creature who can see you and who isn't incapacitated.
(One of the benefits of the Crossbow Expert feat (PHB, p. 165) is to eliminate this disadvantage.)
The only apparent reason the two methods of making this ranged attack are called out separately is what happens to the flask when you make the attack. If you splash the contents of the flask onto a creature 5 feet away, the flask remains intact and in your hand; only its contents (holy water or oil) are splashed onto the creature. On the other hand, if you throw the flask at the creature, it shatters on impact and can't be recovered, causing its contents to splash against the target if it hits.
As Akixkisu's answer notes, oil can also be poured onto the ground directly and lit on fire that way:
You can also pour a flask of oil on the ground to cover a 5-foot-square area, provided that the surface is level. If lit, the oil burns for 2 rounds and deals 5 fire damage to any creature that enters the area or ends its turn in the area.
And holy water can also be poured on the ground directly to purify desecrated ground (DMG, p. 110):
A vial of holy water purifies a 10-foot-square area of desecrated ground when sprinkled on it, and a hallow spell purifies desecrated ground within its area.
Neither of these is an attack, and they involve no rolls. In the absence of anything specifying whether they take an action, this can likely be done with a free object interaction, or the Use an Object action if that has already been used.