What about hours flown solo without a student pilot certificate?
Do I have to re-do the whole solo requirements or they will still count towards my hours?

You will probably not have to re-do the hours. An FAA examiner will look at your log, test you and decide whether to give you a license. It is unlikely that they would notice that your solo time was done before the student license was issued and then disallow the hours. If they did notice and disallowed the hours, you could appeal that decision.

As long as a CFI certified you for solo flight, the hours you did should count.

Do I need to file a complaint through AOPA or FAA or contact my AOPA representative?

No.

What are the rules and who is responsible for that?

It's your job as a pilot to know the regulations and follow them, including requirements such as obtaining student licenses and medicals. The CFI is not your nanny. It is YOUR responsibility to know the rules and follow them.