An intelligence (religion) or intelligence (arcana) check should help a character know the properties of a ghost's horrifying visage. How you set the DC is up to you, and is highly dependent upon the campaign setting. Are ghosts a common thing, where many people might know of the effect that seeing a ghost might have upon the victim? Or are ghosts extraordinarily rare in your setting, with very little chance of anyone having ever experienced this?
Perhaps, if no character has the skill proficiency, there is a library nearby where they can learn about ghosts in an ancient dust-covered tome. If the 24 hour time limit seems too drastic or there is no way for the PCs to otherwise discover the method of reversal in that period, you might consider simply increasing the time period. If you do this, make sure you remain consistent with that time period or are able to otherwise justify the effect's "permanency" duration in some way.
Heck, maybe the event itself turns into another adventure hook, with the PCs going on a quest to search for a "cure" to reverse the aging.
I would expect that something as drastic as instantly aging anywhere between 10 and 40 years to be an urgent matter, dependent on the affected character's race and starting age. An elf might not care at all if he suddenly aged 40 years but a 50 year old human almost certainly would.
The urgency of determining how to reverse the effect will really be determined by that -- and if the PC doesn't care at all, then it's a fun roleplaying moment with little to no impact on the game, otherwise.