I'm interested in Joseph Smith's non-religious worldviews and I'm curious if he did any substantial writing outside of a strictly religious context (i.e. philosophy, politics, etc).
Joseph Smith’s worldview was almost certainly influenced by his religious upbringing and the Second Great Awakening that swept through North America between 1795 and 1830. When Joseph Smith was about 10 years of age his family moved to Palmyra in the State of New York.
Joseph Smith was born on 23 December 1805 in Sharon, Vermont. At that time, there was religious excitement, especially within the Methodist, Presbyterian and Baptist denominations. Around 1820, his mother, two brothers and one sister joined a Presbyterian church, but young Joseph was more partial towards Methodists. However, he was very confused over their conflicting doctrines and the “war of words” at that time. Joseph Smith took himself off into the woods to pray, and there had a vision of a pillar of light which delivered him from the enemy of darkness that overwhelmed him. Two personages appeared before him, one pointing to the other and saying “This is my Beloved Son. Hear Him!” Smith asked which sect he should join and was told they were all wrong and they were an abomination. Smith believed that the powers of darkness had combined against him throughout his young life and that the two personages who rescued him were God the Father and Christ Jesus. Source: ‘History of Joseph Smith, the Prophet’ (History of the Church, volume 1, Chapters 1-5)
Joseph Smith’s experiences are recorded in his book ‘Pearl of Great Price’. Clearly, that is not a secular book. Given how young he was when he had his first vision (around 15 years of age) and taking into account the dramatic changes that ensued, it seems highly unlikely that Smith wrote anything to do with philosophy or politics. It is not as if he went to a secular place of higher education or mingled with “worldly” and non-religious people. I would refer you to a Wikipedia article that gives information on the ‘Joseph Smith Papers Project’ – here is the introduction:
The Joseph Smith Papers (or Joseph Smith Papers Project) is a project researching, collecting, and publishing all manuscripts and documents created by, or under the direction of, Joseph Smith, Jr., the founder of the Latter Day Saint movement. The documents, which include transcriptions and annotations, have been published both online and in printed form. The project is sponsored by the Church History Department of The Church of Jesus Christ of Latter-day Saints (LDS Church), while the website and volumes are published under the department's imprint, the Church Historian's Press. Source: The Joseph Smith Papers.
I think this is a very good question, albeit one that is difficult to answer for at least two reasons. First of all, Joseph Smith's revelations in Doctrine & Covenants outline a metaphysics in which the spiritual and the temporal are thoroughly intertwined, making it difficult to make distinctions like this from a theological perspective (see for instance D&C 29:34–35 and the references in this Wikipedia section on Mormon Metaphysics). Second of all, given Smith's intense and early interest in religion, most of his writings even from a young age have been related to religion.
However, I do know of one source that provides some insights: before his death, Joseph Smith began a campaign for the U.S. presidency, and early in that campaign published a pamphlet outlining his views on major political and social issues of the day. This pamphlet, titled General Smith's Views of the Powers and Policy of the Government of the United States, can be found in an article from the journal Dialogue at this link. The article also provides some commentary on the views outlined in the pamphlet. However, keep in mind the first editorial note from the pamphlet, which reads: "It is likely that most of the actual writing was done by William W. Phelps, who handled much of Joseph Smith's correspondence and journalistic writing during this period. John M. Bernhisel probably also helped and others possibly made some suggestions."