Secondary structure generally involves only hydrogen bonding between backbone attoms (i.e. the N-H and C=O groups in the backbone amide/peptide groups). However, you are correct that lysine and aspartate will contribute to tertiary (and quaternary) structure through forming ionic and hydrogen bonds. (NB: aspartate can also contribute to structure and function by coordinating metal ions).
Aspartates, lysines, and other acidic/basic groups can contribute to changes in the local pH in areas of the protein, but the generally won't change the pH of the aqueous environment in which they reside (since most biological systems are buffered). For example, many DNA-binding proteins have basic regions (i.e. lots of lysines and arginines) which creates a positively-charged pocket to interact with the negatively-charged sugar-phosphate backbone of DNA.