The game I'm playing at the moment, Curse of Saria, has four party members for most of the time, but some sections have fewer, and there is a flashback dungeon with a solo character at a fixed low level. So, a few thoughts....
In the early game, before all party members have joined forces, it's quite natural to have fewer than four at times. But this is a quite different experience from being reduced to fewer in the middle or late game. Early battles should be going easy on the player in any case, with little serious risk of getting knocked out unless the player foolishly neglects healing. So I take it you're mainly asking about the middle or late game.
One character: You have to be more careful about avoiding cheap shots, like a really strong attack that can one-shot the character from above half his maximum health, or debilitating statuses like paralysis. Instead of risk to the player, you could flip the situation and make the challenge come from the difficulty of the solo character posing risk to the enemies. Curse of Saria does this with the final boss of its solo dungeon: Yuki and Sasha will both revive each other if you knock just one of them out. It's a puzzle boss, but a fair one, as you're given all the tools you need: Sensor Sphere (inflicts "scanned" status so you can read their current HP), Turbo Boost (one-use item that casts Haste) and Minibombs (light damage to all enemies).
Two characters: You still want to avoid the cycle where the player can't make progress because the boss knocks out one character, they have to revive instead of attacking, the boss knocks out that character (or the other) again... this feels cheap if the cycle is entered by the boss using a really strong attack that the player can't prepare for. However, with two instead of one, you have more room to use "warning, act now" attacks like poison, silence, medium damage or even HP-to-1.
Naturally, you also need to think about which two characters get paired together, and tailoring the threats to the skills they have available.