Welcome to Microsoft Q&A and thank you for posting your question here.
To affirm your question, you would like to know if it is possible to upgrade Microsoft Exchange online P1 to Microsoft 365 E3/E5.
Yes, it is possible. Microsoft gives room to switch plan or upgrade to another plan.
You can upgrade your Microsoft Exchange Online P1 to Microsoft 365 E3/E5.
You can transition your account to a different plan using the Switch plans wizard in your Admin center.
Even, if you don't have a billing profile or you have tried, and it is not working. To read more about possible ways to switch or upgrade and why can't you change plans. Use this link: Upgrade or change to a different Microsoft 365 for business plan.
Hope this is helpful. Kindly accept the answer to help others and do not hesitate to ask, if you need more clarifications.