The answer is in the question! These websites are in part, more valuable because they operate without any commercial intent. Gov and Edu websites contain high quality content, genuine user participation and a strong backing from their governing body.
For example, look at Stanford University website. There is a reason why the website is a PR 8. All the university students login to the system multiple times daily, post quality content, use information in non-commercial ways and provide value.
Research suggests that .Gov and .Edu actually do get favored more by Google, simply because .edu and .gov show the presence of an authority website. Think about it, most of the educational and governmental websites have quality content, a lot of user participation and therefore are weighted much higher by Google.
Go and check any .Gov and .Edu website, and chances are that it is ranked PR 5 or higher, and that the number of pages (and content) on that website is simply astounding.
Now the question is, can you actually get a backlink from these websites. Yes you can, but doing so is time-consuming. A simply way to get a backlink from these websites is to find their blog, read their post and make an educated comment on it. Incude your keywords and website in the HTML tag. But before you do, make sure that the blog is DoFollow.