Writing sample requirement for PhD application - submit something you assisted in writing?
Would it be okay to submit a portion of this as a writing sample for my phd applications?

Yes. (Personally, I'd submit the whole paper.)

Or is this not allowed since I'm just a research assistant and not a
co-author?

You should make the circumstances clear, e.g., the seed idea was the professor's, the literature review is yours, your literature review influenced the concept of the paper, you wrote 80% of the material, and anything else that's relevant.

Also, the paper is meant to be submitted to a journal for publication so will it be illegal for me to submit a portion of it as a writing sample?

Sharing preprints is fine.

I will definitely not send the results sections.

You can send the results section. If there's concern over IP theft, just make the entire paper available as a technical report.