Yes it is possible to measure the temperature and pressure of highly corrosive materials.  In such cases, the sensors are constructed of materials which are resistant to the acid, or they are shielded by similar corrosion resistant materials.   For example, thermocouples are often placed within a thermowell, which protects them from contacting the process materials.