In short: yes it is perfectly safe (we are talking of a size smaller), no harm, with the use you will discover if it is comfortable or not, start cycling and in a couple of weeks/months you will have a better feeling of your needs.
No, it will be no harm, you need to ride it very intensively to cause harm to your body. And even then, more than the size of the bike it can be a single component (pedal arm, stem, saddle)
On the other hand, a bike one size smaller can be uncomfortable, or as comfortable as the "proper" size, or even more comfortable.
Sizing in bicycle is even more liberal than sizing in clothes. While some guidelines can be derived, the perfect fitting of a bicycle strongly depends on brand, personal preference and body proportions.
Pleas keep in mind that the position itself should not cause any pain, but you will still need some time to break in/get used to the saddle (some bottom pain after half an hour cycling is normal ... in the first weeks). I suggest, after a couple of weeks of use, go to a bike shop and test ride different commuting bikes. Or testing a L or a XL frame of the same bike at the closest Decathlon. You will have a better feeling for bike sizing and posture.