Officially girls are not allowed to stay in your hotel room after 10pm or stay overnight without a registration, which is something most girls avoid to make sure they not show up in a "police data base". Girls who stay with several guys in several hotels, would be an obvious sign of what business they are in. But typical for Shanghai is, that hotel personnel doesn't really care about this regulation, so normally you will not get any problem, as long as you do not select a cheap or low level Chinese hotel. There has been no cases in the last years where a guest of a western orientated 5 star hotel got in trouble, but there have been several chases where the police raided 4 star hotels. Sometimes the police was called by the hotel staff, when they were in doubt whether "illegal activities" were taking place. So if you plan to have fun with girls in your room, better don`t book a low level hotel.
Most 5 star hotels will require the room key to be able to operate the elevator. If you would like to call an escort to your room, you have to go downstairs to pick up the girl, which might get you more attention than you would like to get. For these cases, you can keep an eye out, if you can find a place where you can easily meet the girl on another level than the lobby area. Almost all hotels have some levels without limitation to their guests, for example the restaurant level or the bar level. No room key would be required to go to these levels with the elevator. And it looks more casual if someone is waiting for others in front of a restaurant and bar.
To further lower the suspicion you can also ask the girl to not dress overly sexy. Most of the more experienced girls and the higher level escorts will do this by default already. They will dress properly as a high class fashion girl or just dress casually as if they were visiting friends. However some girls tend to lack this street knowledge so it's best to remind them beforehand, when contacting them, to dress casual. If you would like the girl to wear sexy lingerie or cosplay, you can ask them to bring the clothing and change into it inside your hotel room.