XDocument escapes them itself.
<Student><ID>><&"</ID></Student>
isn't well-formed XML.
Well-formed version, which produces XDocument is:
<Student><ID>><&"</ID></Student>
You can use this code (uses CDATA):
XElement Config = new XElement("Student", new XElement("ID", new XCData("><&\"")));
Output:
<Student><ID><![CDATA[><&"]]></ID></Student>