I know that illiterate people used to sign their names with an x, but how did that come about? And when/how did it become widely accepted as the placeholder symbol (e.g., x marks the location of the treasure chest, etc.)?
I can't talk about the cultural use of the letter X but I can say who invented the concept of X as the unknown.
We're starting in Ancient Persia with the development of al-jebr, the "reunification of broken parts"... or just called Algebra. You might remember that as the part of math that's all about finding the unknown.
This is how a Persian mathematical formula looked like at that time (from Muḥammad ibn Mūsā al-Khwārizmī's The Compendious Book on Calculation by Completion and Balancing, ca 820 AD) and it read like "10 plus something equals 15". This unknown "something" was the Arabic word "shay" (literally meaning "something").
These original Arab algebra texts made their way around the Muslim world and eventually came to then-Muslim Spain, where, around the 11^th or 12^th century, scholars started to translate them into Old Spanish. Now, there are some phonetic sounds in Arabic that do not translate very well into the Spanish language, one of them just so happens to be the the "sh", so the Spanish translators had created a convention wherein the "sh"-sound is substituted with a "k"-sound, represented by the Greek letter χ (chi).
You can still see that costum in certain loanwords and place names, such as the region of Axarquía in Malaga, which was called Ash-sharquía under Berber rule, or the Arabic noble title shereef, which became xerife in Old Spanish and eventually turned into jerife, as the Old Spanish voiceless velar stop slowly morphed into the New Spanish voiceless velar fricative.
Anyway, to conclude the story of X, when these Spanish texts were translated further for the rest of Europe the Greek χ was simply replaced by the Latin X. And because everybody was always looking to shorten words, scholars soon started to abbreviate "xei" as "x." and eventually dropped the period too. That's essentially the reason why everyone in Europe was always looking for X.
Source:
Mainly from memory. But I think I originally read the story in John Derbyshire's Unknown Quantity: A Real and Imaginary History of Algebra, though can't say it for certain. Still a good book regardless.