In American English, a city which is inland from the sea can be referred to simply as an inland city. The AHD definition—
adj. 1. Of, relating to, or located in the interior part of a country or region: inland freshwater lakes and ponds.
—is typical, but I would say that inland as used in AmE does not usually mean "toward the middle," but rather "away from the coast," and may be very relative depending on context. The Los Angeles neighborhood of Brentwood is inland from Pacific Palisades, but that isn't much an impediment for getting to the beach, even in Los Angeles traffic.
I hesitate to speak for British English as I know inland is frequently a synonym for domestic (e.g. inland post, Inland Revenue), and geographic sensibilities as to direction and distance are very different, so too with Australia.
If you want to specify that a city is very deep inland, you could refer to it as an interior city—
adj. 1. Of, relating to, or located on the inside; inner.
3. Situated away from a coast or border; inland.
Interior more strongly indicates something close to the middle and far from the coasts; Sacramento or Albany or even Washington, D.C. are inland, but I would not expect them to be called interior cities, even if by a technical definition that would be true. Salt Lake City is an interior city, St. Louis is in the interior. In the U.S., this sense may be reinforced because the U.S. Department of the Interior is the division of the federal government which deals with federal lands, natural resources, and Native Americans—far away (or driven away) from the major cities, and again I cannot speak for elsewhere, where an interior ministry is something completely different that has no real U.S. equivalent.
Distance from the borders with Canada or Mexico is more nebulous a requirement; I wouldn't refer to Detroit or El Paso as interior cities, but others might.
Another approach, as @Billy suggests, is to describe the city based on geographic terms that indicate distance from the sea. If I describe Lincoln, Nebraska as a Great Plains city, or Helena, Montana as nestled in the Rockies, or even that Louisville is in Kentucky, someone familiar with American geography will know that they cannot be situated anywhere near the ocean. This only works for a handful of regions, however.
The further danger is that there are cultural associations with certain geographic terminology that may not make sense, particularly with ill-defined terms like heartland or Middle America. Boulder, Colorado is in the middle of America, but it is not of Middle America; its stereotypical resident would not be labeled a Middle American, but its stereotypical resident would not mind that in the slightest.
As to the setting of a city in the countryside, I don't understand your meaning. The very definition of city means that wherever the city is located is not rural. You will encounter farms and ranches and open space driving an hour outside Kansas City, Missouri, but you can also find farms and ranches and open space an hour outside San Diego or Philadelphia.