You can’t access text from within a DWG using the Revit API unfortunately. There are alternative options: using LISP routines in Autocad to export the text metadata to Excel, exporting the DWG within Revit to DWF then parse the file to extract the text metadata, or use COM to access a DWG from within an open session of Autocad and use the Autocad API to get the text metadata.
I think there is also a hacky way to do it through the Revit APIUI library which basically explodes the DWG as one would manually, then get the text elements before undoing the explode. However this is limited to the restrictions Revit places on exploding DWGs …and exploding should be banned outright, even if it is a controlled action by a piece of code, so I wouldn’t recommend it!