To my knowledge, rickets is caused by malnutrition. It seems incongruous to state that she was not ill treated if she was not fed well enough to prevent malnutrition.
Elizabeth suffered from mobility problems and was a semi-invalid long before the civil war broke out. Her freedom of movement was restricted after her brother James escaped during a game of hide-and-seek they were playing in the garden. Lack of sunlight is a major cause of rickets. It’s likely that the rickets made her mobility problems worse, which kept her out of the sun, which made the rickets worse. Her gaolers’ decision to keep her inside as much as possible would also have made her rickets worse.
Elizabeth wasn’t in a Louis XVII situation. Her captors had good reason to keep her healthy, as happy as possible, and alive: her first cousin was Louis XIV; her brother-in-law was the Stadholder of Holland; and she was a cousin of sorts to the Danish royal family. Throughout her imprisonment, there was a chance that her father or brother would regain the throne, which would put her in a position to reward or punish her captors. She wasn’t starved or abused but I think it’s fair to say that she suffered as a result of the psychological blows she endured and because of the poor medical care in that era. Even if she’d joined Mary in Holland, I don’t think she would have survived; I think that she'd been too sick for too long. If Elizabeth had showed up in Holland, Mary's doctor probably would have killed a pigeon and put it on her head in an attempt to cure her, that's how bad doctors were back then. As I recall, Alison Plowden said that Elizabeth contracted tuberculosis in the home of one of her captors. I think Elizabeth was tubercular a lot earlier than that. Her sister Anne died of tuberculosis as a toddler. During his autopsy, Charles II’s lungs showed signs that he’d suffered from tuberculosis and had recovered; unlike Elizabeth, Charles had an iron constitution. As the deaths (from smallpox) of Mary, Henry, and Mary II proved, the royal palaces were germ factories. It's amazing that any of the Stuarts came out of Whitehall alive.
It is a pity that most of what we know about Elizabeth was written by various and sundry misty-eyed people after the Restoration. A lot of her history is a blank. She seems to have been highly intelligent as well as capable of political manipulation and strategic planning. She would have been a major asset to Charles II.