Yes, it’s absolutely fine to leave your pokémon in a PC if you’re expecting to be incapable of caring for a pokémon over a longer period of time. In fact, that’s actually one of the reasons why the PC exists. We’re aware that not every pokémon is capable of being housed for long-term care, especially given the finite space that traditional pokémon centers, day care centers, or “pokémon hotels” have. (Never mind the fact that most centers and day cares have limits on how long a pokémon may be able to stay, and it’s sometimes difficult to find a reputable pokémon hotel.) The PC will place your pokémon in a safe state of suspended animation until you’re fully capable of caring for them again, so it’s certainly one option.
Understandably, of course, some humans prefer to find actual people who will be able to take care of their pokémon, so I would suggest using the PC as a final resort, if you’ve exhausted all other options…
…short of a pokémon hotel, anyway.
(Seriously, don’t put your pokémon in a pokémon hotel. A day care or pokémon center, perhaps, but not a pokémon hotel.)
Best of luck in temporarily homing your pyroar, anonymous!