The directive says "with a valid identity card or passport", which also means a contrario that nothing else is required. Putting additional requirements like having a document that's valid for a certain amount of time would seriously impinge on free movement rights and would almost certainly prompt action from the Commission or fail in court.
In fact, there is no clear-cut requirement to hold any specific document, the logic of the rule is that EU member states cannot deny entry when you have one. They can check these documents according to their own rules, in particular to ascertain your citizenship, and possibly fine you but not remove you merely for this reason. That's clear from the rest of the article on the right of entry:
- Where a Union citizen, or a family member who is not a national of a Member State, does not have the necessary travel documents or, if required, the necessary visas, the Member State concerned shall, before turning them back, give such persons every reasonable opportunity to obtain the necessary documents or have them brought to them within a reasonable period of time or to corroborate or prove by other means that they are covered by the right of free movement and residence.
How that's supposed to work in practice is a little unclear obviously but that's very strong language and explicitly implies that freedom of movement rights are not contingent on any documentation and that states are perfectly allowed to let you in without it.
Beyond that, Schengen rules are highly unusual for a number of reasons. The two main regulations (partially) replace a separate convention and are immediately applicable. By contrast, it's in the nature of directives to define generic principles that states have to implement in their own legislation. There are some caveats and complications but you should not expect a directive to spell out this kind of things in more details.
Also, while they are not required to do that under EU law, some EU member states also accept expired documents as sufficient to grant entry to citizens from some other EU countries. That might not be obvious if you come from a country with mandatory registration but some countries do not require people to hold ID or do not issue ID cards at all, another reason why harmonizing beyond the general principles defined in the directive would be fraught with difficulties.