Juan José was kind towards Charles, but it wasn't just out of loyalty that he didn't usurp the throne: it was simply impossible in those times for a bastard to inherit a Crown, let alone if it had a legitimate king reigning.
Juan José had three known illegitimate daughters who didn't have any offspring, as they all became nuns:
1. Margarita de Austria (1650- Oct. 1686), she was born to Ana Lucía de Ribera, daughter of Jusepe Ribera, Lo Spagnoletto. She eloped with don Juan José when he was in Naples acting as Governor of that country, creating much scandal. Margarita became a nun in the Descalzas Convent in Madrid in 1665. She died there.
2. Catalina Ana Isabel de Austria (1661-26/11/1709). She was born in Madrid to an unknown mother and she died as a nun in Brussels.
3. Ana María Juana Ambrosia Vicenta de Austria (1663-17/3/1705). She was born in Madrid to an unknown mother and she died as a nun in Madrigal de las Altas Torres.