To expand on GBG's answer, here are some details about how to proceed in QGIS.
QGIS may not be able to edit a layer in KML format. You'll know that QGIS can't edit your layer if you can't click the edit button in the digitizing toolbar. If that's the case, export to a different vector format, eg shapefile.
explode the multi-part features to single features
Follow the method explained here: Exploding multipart polygons within shapefile in QGIS?
Use the PDF to manually assign elevations to the lines
Add a numerical attribute table field and start adding data to the corresponding features. Since a numerical field cannot store units of measure, it may be useful to include that in the field name. For example, if your elevation is in meters, you could call the field "Elev_m."
See the relevant section of QGIS manual for more details.
Optional: Try one of these methods to make it easy to see at a glance which contours have elevation assigned, and which still need it.
- Label the layer with the new elevation field.
- Set up rule-based styling, so that contours without elevation data are one color, and contours with elevation data are another color. Eg, set up one style with the rule
"Elev_m." is not null, and a second style with the rule
- Set up conditional formatting of the attribute table to highlight rows where the elevation field is blank.
Be sure to save your changes to the layer once you're done. Note that QGIS has two different save buttons: one for the QGIS project, one for layer edits.
Some of the methods for the next step (interpolating a surface/creating a TIN) require points instead of lines, eg Creating Tin from Elevation Points in QGIS?
To convert your contours to points, use the Extract Vertices tool from the processing toolbox. How to convert a line to points?
Note: the contours were probably created from elevation point data. By converting the elevation point data to contours and back to points again, you've lost a lot of the details of the original information. If you can acquire the original point data, your results will be more precise.