It applies everywhere. Germany and Poland courts said that they interpret this principle is against their constitutions. The consequence is that they need to either:
- Change their interpretation of their constitution
- Change their constitution
- Leave the EU
It's a basic principle of participation in a Union. Germany's or Poland's case is the same as if a State of the US decided that some federal law or the US constitution doesn't apply in that territory because their constitution prevails or that the state supreme court can overrule the decisions of the US supreme court.
The EU case is much easier than the US, of course, because EU Member States have the right to unilaterally decide to secede. So they can always just leave if they really don't want to comply with EU laws. They have no excuse whatsoever to whine about them.