UCSD economics is more math-based (i.e. better for pre-PhD study), though in either case, you will want to take more advanced math (e.g. real analysis, upper division proof-based linear algebra) and statistics (e.g. calculus-based upper division probability theory and statistics). UCSD also has a joint major in economics and math.
However, at UCSD, math and economics are capacity-limited majors.
https://www.math.ucsd.edu/~handbook/undergraduate/cappedstatus/
https://economics.ucsd.edu/undergraduate-program/entry-to-the-majors.html
CS is also capacity-limited, and extremely difficult to get into if not directly admitted as frosh.
https://cse.ucsd.edu/undergraduate/cse-capped-major-status
SDSU economics is moderately impacted, while math and computer science appear not to be impacted enough to need a GPA higher than 2.0 to change into there.
http://arweb.sdsu.edu/es/admissions/transfers/gpa.html
For capacity-limited or impacted majors, do not expect to be able to enroll easily in upper division courses if you are not in the major, since the courses will be filled up by students in the majors who have top priority for them.
The cost/debt consideration obviously favors SDSU.