The spell doesn't prohibit the gaining of experience, so it doesn't… at least not automatically.
You bring up some examples where it might make sense to not gain XP though: the sub-human intelligence giant bug and the alien-minded elemental. A DM might look at those and decide that the former is incapable of learning, and the latter is capable of learning but their normal mind would be incapable of applying those learning experiences later to their true form's life.
The other two examples (the minotaur and the lamia) might inspire the thought that experience gained is still useful, but not fully applicable to their true form. A DM might think that maybe they should earn XP, but not the full amount…
And maybe a DM might think that gaining XP while effectively being a member of a different class should… have an effect? Maybe it can be handled by multiclassing once returned to true form, or just wiped out, or transfered at a reduced rate…?
A DM could have all kinds of useful thoughts about these situations, which the book doesn't answer for them.
Fortunately this doesn't have to be complicated, because it's a rule that the DM can make such rulings according to what makes sense and is best for their group's game. It's their job within the game to make decisions based on real game contexts that the rules don't or can't foresee. The DM at the table is far better equipped to make choices that are best for their game than a designer far away and years in the past, anyway.
So if you're the DM: decide. If you're not the DM: ask your DM.
Yes, it works
However, how it works differs between the spells.
Polymorph
This spell transforms a creature with at least 1 hit point that you can see within range into a new form.
This is the same creature. Clone "grows an inert duplicate of a living creature" so the clone you grow will be in its original, not transformed form. If the creature dies, its soul occupies the clone irrespective of the form it was in when it died.
True Polymorph
You transform the creature into a different creature ...
Clone will grow a duplicate of this different creature. If the different creature dies, its soul will move to the clone. If this different creature returns to the original creature then if it dies the clone won't work since the clone is not of the original creature.
Best Answer
A precedent exists for the answer to possibly be 'yes', but this is still very much a case-by-case/DM's choice basis.
The entry on half-dragons in the Monster Manual cites that they come from (in some cases) a coupling between a dragon polymorphed into another form and another creature (presumably one compatible with the polymorphed form). This would imply that, for dragons at least, pregnancy is a possibility and results in a hybrid between their true form and the form of the partner.
It does not delve into the topic of what that pregnancy is like as it shifts between forms, however, so that's up to your DM if you wish to broach that topic with them.