Thanks for introducing me to the grammatical concept of mediopassive voice which is described at https://en.m.wikipedia.org/wiki/Mediopassive_voice
[Extract] The mediopassive voice is a grammatical voice that subsumes the meanings of both the middle voice and the passive voice (...) A few examples of verbs in English with meanings similar to a mediopassive:
The book reads well.
The trousers wash easily.
Ripe oranges peel well.
The book was not selling.
Based on this extract, the sentence you quoted is indeed an example of mediopassive voice:
What is the number of bytes needed for an instruction to store in memory?
Your rewriting it as "to be stored" is also correct but there is nothing wrong in context with the original sentence: the meaning does not change significantly by writing it as "to store" and the only 'difference' is that 'instruction' mediopassively becomes the subject rather than object of the verb 'to store' in this particular construction.
In a sense this difference "empowers" the former object by apparently giving it some agency: when written this way, "to store" is depicted as an action performed by 'instruction' when certain conditions (like number of characters) are satisfied, just as a book when well-written actually reads well rather than simply getting read -- that is the more interesting element of this concept.