Is differentiated instruction permitted by universities?
It would be very unusual, in my experience in the U.S., for one group of students in a class to be given an "easier" exam than other students in the same class.  When the students who took the "harder" exam found out about it, they would have a valid grievance that the faculty member would be unlikely to win.  If a colleague asked me about this, I would strongly discourage giving different exams. 

At the same time, it is perfectly reasonable to give individualized instruction before the exam. This is more feasible with small classes than large ones.  At smaller schools, it is common for faculty to meet one-on-one with students, explain background material, and suggest additional problems to help those students self-remediate.  

Whether this is possible for you on how much time you have available to do it, and also on whether you can convince the struggling students to put in the extra work that will be necessary for them to succeed. Unfortunately, some students are unable to do that, or choose not to.  



I also want to give some more personal remarks, because I empathize with the spirit of the question: not wanting to leave students behind when they arrive underprepared for a class. I also teach at a school where some students have clear potential but were underserved by their high school and don't have the background that is expected when entering college. 

The question mentioned being "fair to everyone". This has many meanings. You want to be fair to each student - which means both recognizing where they are currently at, and not sending them forward without the background to succeed in their next class.  You want to be fair to the other students by making the class similar for everyone. And you also want to be fair to future professors, by sending them students who have the appropriate background.  

Sometimes, you will be in a position where you can't do all these things. Perhaps a student has real potential but simply can't get to the necessary level by the end of the course. Perhaps the student could get there, but has personal or family obligations that occupy their time. Perhaps a student is just not quite mature enough to put in the work needed. 

This can be one of the more difficult situations for a professor. But it is also very common, particularly at institutions that are not extremely selective. If you talk about it with your more experienced colleagues, they will have their own experiences with it, and they will be able to give you advice and support.