Transferring into the University of Pennsylvania as a sophomore is at best going to a reach.
Whether it is difficult and unlikely versus impossible in your case might depend upon information that you have not yet provided.
Whether it is a good idea, a bad idea, or somewhere in the middle is also likely to depend upon information that you have not yet provided. Certainly both the University of Pennsylvania and UCLA are very good universities. Congratulations on acceptance to both of these excellent schools.
Have you already completed a year at UCLA, or are you planning on starting there in September? What is your reason for thinking of transferring to Penn?
In general to transfer into a very highly ranked private university in the USA usually requires a good academic reason to want to transfer. Given how very strong UCLA is for a very wide range of majors it is hard to me to guess what this good academic reason might be in your case. Can you explain this?
Why did you choose to attend UCLA? Is this reason still valid?
In contrast to the difficulty of transferring as an undergraduate student into a highly ranked private university in the USA, completing your bachelor’s at one university and getting a graduate degree (such as a master’s degree) at a different university is very common, and is certainly a realistic option to consider at some point in the future. Doing very well at UCLA and getting good research / internship / coop / work experience would be helpful if at some point this becomes a goal.