Tough to answer this question directly, but I can think of a few ways of getting at it - I'd probably want to see multiple metrics used in combination to create some kind of "score"

1. Aging analysis of classes / methods (when was the last time this method was changed?) 
2. Bugs per feature area, or if you're looking for more technical analysis bugs per function point / class / method - I'd caution here that some people might be tempted to use this as a developer performance metric, so tread lightly
3. Cyclomatic complexity or function point analysis 
4. Code coverage / unit test density
5. Qualitative code coverage / "WTFness" measure - a mix of engineers familiar with the code and those who are not will yield great insight into things like readability, logical flow, etc - more subjective sure, but so is tech debt :) 

hope that helps!