Is all data stored in computers stored as machine code?
I wouldn't put it that way.  What is stored in memory is bits.  It's just data in binary form.
Humans might then label some of those bits as &quot;machine code&quot; because we intend or expect it to be executed; or because it will be executed.  That's a matter of interpretation we apply.  The memory module just sees a bunch of bits.  It just sees some data and has no knowledge of what the meaning or intended purpose of that data will be.
Memory is not limited to storing executable code.  Computers also store other data in memory.  For instance, your computer might store a copy of an email, or a picture or photograph you took.  Those aren't code, but they can be stored in memory.
It may be helpful to think that the memory can be used to store data or can be used to store code -- but there is nothing in the computer architecture that enforces any distinction between the two.  From the perspective of the memory module, it is just bits.