Specific beats general, the Bladesinger can use a cantrip
There are many rules in D&D, and many effects that overrule those rules. The rules instruct us that specific beats general:
This book contains rules, especially in parts 2 and 3, that govern how
the game plays. That said, many racial traits, class features, spells,
magic items, monster abilities, and other game elements break the
general rules in some way, creating an exception to how the rest of
the game works. Remember this: If a specific rule contradicts a
general rule, the specific rule wins.
Exceptions to the rules are often minor. For instance, many
adventurers don’t have proficiency with longbows, but every wood elf
does because of a racial trait. That trait creates a minor exception
in the game. Other examples of rule-breaking are more conspicuous. For
instance, an adventurer can’t normally pass through walls, but some
spells make that possible. Magic accounts for most of the major
exceptions to the rules.
In this case we must consider what is normal, and then what is changing the rules.
The simplest case
Consider a normal goblin. On the goblins turn they get 1 Action. If they use that Action to take the Attack action they get to attack once. If this goblin was Hasted, then they get a second Action, with which they can attack once more. I would consider this the most basic case.
Note that you can normally use your attack action to grapple or shove, but Haste only lets you make one "weapon attack", so you aren't allowed to use the free action to use these special attacks. Since these actions are available to all creatures, I would say that Haste overrules this general rule with its specific language.
A more complex case, but also quite common
The Attack action mentions another special case that overrules the normal rules;
Certain features, such as the Extra Attack feature of the fighter, allow you to make more than one attack with this action.
This situation is common enough that it is even mentioned within the action. Not just fighters get it, Barbarians, Monks, Paladins, and Rangers - as well as the College of Swords Bard, the Bladesinger Wizard, and the (unofficial) Blood Hunter. Not just that, many monsters also have Multiattack, which is essentially Extra Attack but for monsters. If you are playing D&D at midlevel or higher, you probably have a least one person in your party who has Extra Attack, and are fighting against monsters that have Multiattack.
A level 5 Fighter has Extra Attack, so if they were hasted then I believe the specific language of Haste would prevent them from using both their attacks. Generally the fighter could attack twice, but not when using Haste to take the Attack action.
The rare case
Now we come to Bladesinging. Bladesinger's Extra Attack is unique, no other Extra Attack is like this, nor is any Multiattack. It has two clauses:
You can attack twice, instead of once, whenever you take the Attack action on your turn. Moreover, you can cast one of your cantrips in place of one of those attacks.
The use of the word "moreover" may make this unclear to readers who aren't native English speakers. The word means "additionally". So when the Bladesinger uses the Attack action they can attack twice, and they can cast a cantrip in place of one of those attacks.
This is where things get extremely ambiguous.
Is Bladesinger specific enough to override Haste?
Bladesinger is an extremely niche case. Haste is a common spell, and seems to be written to interact with other common elements like Extra Attack, Multiattack, Shove, and Grapple. I don't see a reason to think that Haste should be able to overrule the second half of Bladesigner's Extra Attack since it is so unique.
Can you still use Extra Attack?
Haste doesn't disable Extra Attack, it just limits the character to 1 attack regardless of how many attacks they have and the source. This means that the second half of Bladesinger's Extra Attack is still available to use.
DM ruling is required
I think the rules are sufficient to say that the Bladesinger's special unique ability can be used even when hasted. However your DM may say otherwise. The rules are not clear in this case, so it may be a good idea to discuss it with them.