Either is possible, but the subject of the sentence is different in the two examples.
1. 'when faced with hardships' is in the passive voice. It's an elliptical form of 'when they are faced with hardships'. In this sentence, the hardships are facing the people.
2. 'when facing hardships' is a participle phrase in the active voice. The full form of this is 'when they are facing hardships'. In this sentence, the people are facing the hardships.
The structures are different, but the meaning is pretty well the same.